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

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”

Feed the output of the buttons into the Text node.

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

Thank you very much Andrei.

1 Like