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

#1

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”

0 Likes

#2

Feed the output of the buttons into the Text node.

0 Likes

#3

One possible way: configure your ui_text node as below (for instance),

b-0002

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

0 Likes

#4

Thank you very much Andrei.

1 Like