# Error in on input function

**URL:** <https://discourse.nodered.org/t/error-in-on-input-function/10497>\
**Category:** General\
**Created:** [24 April 2019 10:10 UTC](https://discourse.nodered.org/t/error-in-on-input-function/10497 "2019-04-24T10:10:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trujillo](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@trujillo](https://discourse.nodered.org/u/trujillo)\
**Post date:** [24 April 2019 10:10 UTC](https://discourse.nodered.org/t/error-in-on-input-function/10497/1 "2019-04-24T10:10:28Z")

</div>

Hi, I've a problem with node.on('input', function(msg));

I have the next code:

```auto
function AppendAttributeNode(config){

       RED.nodes.createNode(this, config);
       this.fiware_host = config.fiware_host;
       this.fiware_port = config.fiware_port;
       this.fiware_entity = config.fiware_entity;
       this.fiware_type = config.fiware_type;
       this.fiware_attributes = config.fiware_attributes;

       var node = this;
       this.on('input', function(msg){
           node.send(msg);
       });

```

My problem is that the function doesn't execute, and I don`t receive anything in the debug node.

Thanks!
