Dynamically change label of ui-switch

Hello,
Despite the help, that tells:
The label can also be set by a message property by setting the field to the name of the property, for example {{msg.topic}} .

I'm not able to change dynamically the label.

I've tried to send a message with msg.label, msg.Label, msg.payload.label, etc.... but the label doesn't change.

Any ideas ?

Thanks for your support

Olivier

Hi Olivier.

It works for me using {{msg.payload}} (or any other property of msg).

What version of Node-red do you have, what platform?
What version of node-red-dashboard?

Hello,

My version is 2.1.4 running on a Synology NAS
Dashboard is 3.1.7

I’ve tried to send the message via an inject node

Dumb question:

Have you told that node to use...... {{msg.whatever}} to be the label?

Open the ui-switch node and take a screen shot, or export the node and post it.

If you do a screen shot, before you post it, crop out all the other stuff so only the node's edit window is in the shot. (Makes it better to see when you post it)

" The label can also be set by a message property by setting the field to the name of the property, for example {{msg.topic}}."

thanks,
was not clear for me that I've to put in the label field of the properties the field of the message that allow to change the label.
Thanks again
Olivier

I think the help text could be more clearly worded to reflect the use of squiggly brackets, or at least with a link to a comprehensive explanation of {...}, {{...}} And even {{{...}}}.

Good grief that was hard to type on my phone!

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