I just started playing with the SVG nodes and context menu.
I would like to know if there is anyway i can fill the label field in the following image to display something i pass from another node.
Sadly, this is what i am getting.
Can someone help me with displaying a custom label from another node??
checkout the readme, built in help and the built in examples (CTRL-I
) - it shows you how to generate dynamic entries
1 Like
I have gone through it but i get this error
It looks like i am doing something wrong
is that a function node? a template mode? Which example did you try?
Sorry for the delay. I would like to have the programmed with a function node.
I am not sure how to address that label in the contextmenu (from a function node) as shown in the last image on the original post
I asked if it was a function node because you have simply put an array in it with without doing anything with it.
Try this in your function node...
msg.menu = [
{
"text": msg.payload[0].ParkingSlot,
"icon": "fa-car",
"enabled": true,
"topic": "ParkingSlot",
"payload": msg.payload[0].ParkingSlot,
"payloadType": "str"
},
{
"text": msg.payload[0].CarNoPlate,
"icon": "fa-text-width",
"enabled": true,
"topic": "CarNoPlate",
"payload": msg.payload[0].CarNoPlate,
"payloadType": "str"
},
]
return msg;
Connect as follows...
your data payload --> function node --> menu node
1 Like
system
Closed
15 September 2022 16:20
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.