# Text node needs possibility to set input value

**URL:** <https://discourse.nodered.org/t/text-node-needs-possibility-to-set-input-value/90936>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [13 September 2024 09:52 UTC](https://discourse.nodered.org/t/text-node-needs-possibility-to-set-input-value/90936 "2024-09-13T09:52:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhiteLion](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/whitelion/32/12266_2.png) [@WhiteLion](https://discourse.nodered.org/u/WhiteLion)\
**Post date:** [13 September 2024 09:52 UTC](https://discourse.nodered.org/t/text-node-needs-possibility-to-set-input-value/90936/1 "2024-09-13T09:52:37Z")

</div>

While migration to DB2 I have to add many extra nodes to set the msg.payload to the value that the DB2 text node needs. In DB 1 it was possible to give the text node the where to take value from {msg.anything.anyvalue}. like here in the:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/9/d9ffbcd7b181119da31c3bd429fcb6e24a1acfd6.png)

Now I end up with stuff like this:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cfdacb1f562656433cc92214fd7bbcd05df55ca5.png)

while before it was like this:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/9/897bedec3cce055d3b2c12a1b995018b9e413fbb.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2024 10:23 UTC](https://discourse.nodered.org/t/text-node-needs-possibility-to-set-input-value/90936/2 "2024-09-13T10:23:02Z")

</div>

Use a template node rather than a function node.

There are plans to do something similar, but more flexible, in DB2, to avoid the need for the templates, but at the moment that is the way it is, unfortunately.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [14 September 2024 11:06 UTC](https://discourse.nodered.org/t/text-node-needs-possibility-to-set-input-value/90936/3 "2024-09-14T11:06:51Z")

</div>

It comes up _a lot_. The core Node-RED template nodes are cleaner than function nodes, but I appreciate it overcrowds the flows with extra nodes.

The driver behind our decision is that it also permits access to `flow.`, `global.` and is consistent with how you could inject custom HTML here too, i.e. making the piece of text a link.

The idea of the `value` field opens up a lot of security vulnerabilities, and it's something we've avoided investing time into for other priorities at the moment. That said, it is proving difficult to keep ignoring.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 October 2024 11:07 UTC](https://discourse.nodered.org/t/text-node-needs-possibility-to-set-input-value/90936/4 "2024-10-14T11:07:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
