# Multiple references in Value Format field for text node

**URL:** <https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319>\
**Category:** Dashboard\
**Created:** [2 January 2019 17:58 UTC](https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319 "2019-01-02T17:58:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gadams999](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gadams999/32/4868_2.png) [@gadams999](https://discourse.nodered.org/u/gadams999)\
**Post date:** [2 January 2019 17:58 UTC](https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319/1 "2019-01-02T17:58:08Z")

</div>

Hi,

I'm getting up to speed on passing payload value to a text node for my dashboard. Using the following provides a working LED indicator based on msg.color passed in to the _Value format_ field:

`<font color={{msg.color}} ><i class="fa fa-circle" style="font-size:24px;"></i></font>`

What I would like to do is pass in a second value, say, msg.icon to change the icon type too, along with the color. In testing, it appears only the first mustached entry is parsed, so I tried to make a value that contained all of the HTML code and pass through that way:

- Upstream node: msg.content = '\<font... rest of stuff... \>'
- Value format for text node: {{msg.content}}

I'm new to the dashboard functionality, so is there a way to do it with the text node, or should I look at using another Dashboard node to accomplish?

Thanks in advance!

---

<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:** [2 January 2019 20:45 UTC](https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319/2 "2019-01-02T20:45:57Z")

</div>

you pass the icon in via the icon field (not the value field) so it can use {{msg.icon}} or whatever you need.

---

<div class="post-metadata">

**Author:** ![gadams999](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gadams999/32/4868_2.png) [@gadams999](https://discourse.nodered.org/u/gadams999)\
**Post date:** [2 January 2019 21:36 UTC](https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319/3 "2019-01-02T21:36:02Z")

</div>

Thanks for the reply, I don't see an icon field for the text node, just _Label_ and _Value format_.

I'm using this style of HTML in the value format to have the Font Awesome icons via HTML. For instance I would use "fa-cog" for an non-operating state, then change it to "fa-cog fa-spin" to denote it's operational (spinning icon). I solved by creating my own template that mostly gets the same CSS as the text node, but was just looking for confirmation if only one attributes value can be submitted.

---

<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:** [2 January 2019 22:50 UTC](https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319/4 "2019-01-02T22:50:03Z")

</div>

Correct you can only have one substitution. And yes also correct about no icon , sorry. I was thinking about button for some reason.

---

<div class="post-metadata">

**Author:** ![notnice](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@notnice](https://discourse.nodered.org/u/notnice)\
**Post date:** [27 April 2020 08:33 UTC](https://discourse.nodered.org/t/multiple-references-in-value-format-field-for-text-node/6319/5 "2020-04-27T08:33:22Z")

</div>

I was looking for same solution to visually indicate a condition like door open/closed.  
I think it would be good to be able to alternate icons in the Text node config like I can text colour (as per my example Value string below) rather than resorting to creating a template.  
\<font color={{(msg.payload?"red":"grey")}}\>
