# Custom Node Data Input Question

**URL:** <https://discourse.nodered.org/t/custom-node-data-input-question/8415>\
**Category:** General\
**Created:** [26 February 2019 19:39 UTC](https://discourse.nodered.org/t/custom-node-data-input-question/8415 "2019-02-26T19:39:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcontrada](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tcontrada](https://discourse.nodered.org/u/tcontrada)\
**Post date:** [26 February 2019 19:39 UTC](https://discourse.nodered.org/t/custom-node-data-input-question/8415/1 "2019-02-26T19:39:53Z")

</div>

I have created a custom node and in the .JS file there is a line of code which accepts the User Input Data from the HTML dialog.  
This is the line of code I m referring:

```auto
this.applicationHash = config.applicationHash;

```

How can I override the user's data and accept data from an input that I pass in the msg object?

Thanks...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 February 2019 19:51 UTC](https://discourse.nodered.org/t/custom-node-data-input-question/8415/2 "2019-02-26T19:51:28Z")

</div>

well.... our basic rules is actually the opposite of that...  
If the user has set a parameter then they actually want that value and so it should not be overridden. If they leave it blank then it should be set by a msg property...

usually in the on input handler you set a new variable

```
 var appHash = node.applicationHash || msg.applicationHash || "my_safe_default";

```

sort of thing

---

<div class="post-metadata">

**Author:** ![tcontrada](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tcontrada](https://discourse.nodered.org/u/tcontrada)\
**Post date:** [26 February 2019 20:08 UTC](https://discourse.nodered.org/t/custom-node-data-input-question/8415/3 "2019-02-26T20:08:46Z")

</div>

Where does that line of code go? In the J's file, or from a msg input to the node?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 February 2019 20:22 UTC](https://discourse.nodered.org/t/custom-node-data-input-question/8415/4 "2019-02-26T20:22:40Z")

</div>

for example see the httprequest node where if you leave the url blank you can inject one using msg.url

> <https://github.com/node-red/node-red/blob/master/nodes/core/io/21-httprequest.js#L47>
