# Text "label" = global.get("currentLabel")

**URL:** <https://discourse.nodered.org/t/text-label-global-get-currentlabel/1294>\
**Category:** Dashboard\
**Created:** [3 July 2018 20:54 UTC](https://discourse.nodered.org/t/text-label-global-get-currentlabel/1294 "2018-07-03T20:54:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweetwater](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sweetwater](https://discourse.nodered.org/u/sweetwater)\
**Post date:** [3 July 2018 20:54 UTC](https://discourse.nodered.org/t/text-label-global-get-currentlabel/1294/1 "2018-07-03T20:54:48Z")

</div>

Is there an easy way to do this.  
We have a TEXT ‘label’  
We want the TEXT ‘label’ to = the Button “label” clicked.

TEXT ‘label’  
Button1 ‘label’= ABC  
Button2 'label = DEF

When Button 1 is clicked, the Text 'label" shows “ABC”  
WHen Button 2 is clicked, the Text ‘label’ showls “DEF”

---

<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:** [3 July 2018 21:22 UTC](https://discourse.nodered.org/t/text-label-global-get-currentlabel/1294/2 "2018-07-03T21:22:28Z")

</div>

Feed the output of the buttons into the Text node.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [3 July 2018 22:59 UTC](https://discourse.nodered.org/t/text-label-global-get-currentlabel/1294/3 "2018-07-03T22:59:10Z")

</div>

One possible way: configure your ui\_text node as below (for instance),

![b-0002](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/680cfd5f50bdcb231691efa8ffcf880829a49283.PNG)

then make your buttons to generate the property topic. You could hardcode the topic in the buttons equal to the label name (see pic below). This will work if the buttons and nodes are wired in the same flow (ui\_text dowstream of course) and you preserve the topic property along the way.

![b-0001](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/a2175b06c23262826ea4f9705ca99df296c3b279.PNG)

---

<div class="post-metadata">

**Author:** ![sweetwater](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sweetwater](https://discourse.nodered.org/u/sweetwater)\
**Post date:** [5 July 2018 12:56 UTC](https://discourse.nodered.org/t/text-label-global-get-currentlabel/1294/4 "2018-07-05T12:56:01Z")

</div>

Thank you very much Andrei.
