# Default value in ui\_text label possible?

**URL:** <https://discourse.nodered.org/t/default-value-in-ui-text-label-possible/29928>\
**Category:** General\
**Created:** [12 July 2020 00:01 UTC](https://discourse.nodered.org/t/default-value-in-ui-text-label-possible/29928 "2020-07-12T00:01:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [12 July 2020 00:01 UTC](https://discourse.nodered.org/t/default-value-in-ui-text-label-possible/29928/1 "2020-07-12T00:01:24Z")

</div>

Is it possible to do something like this?

Label -\> {{msg.topic}} || SomethingAsDefaultString

Such that if {{msg.topic}} is empty, SomethingAsDefaultString populates the label? I guess I could always use a function to address the issue, or just an injection to set default label and then update the label as part of the text item (value) population, but would be cool if I could just set the label directly as noted above. What I am after is something like the initial message you can set on a chart, until chart data arrives.

---

<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:** [12 July 2020 07:25 UTC](https://discourse.nodered.org/t/default-value-in-ui-text-label-possible/29928/2 "2020-07-12T07:25:50Z")

</div>

Not currently possible, apart from via the workarounds you mention, but not the worst idea in the world. Worth thinking about on the next rainy day.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [12 July 2020 15:55 UTC](https://discourse.nodered.org/t/default-value-in-ui-text-label-possible/29928/3 "2020-07-12T15:55:30Z")

</div>

Thanks for the consideration! Appreciate it.

---

<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:** [10 September 2020 15:55 UTC](https://discourse.nodered.org/t/default-value-in-ui-text-label-possible/29928/4 "2020-09-10T15:55:31Z")

</div>

Closed on 10 September 2020 15:55 UTC

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