I would like to create a group in Node-RED depending on the value msg.payload (It should be created and also named according to the included value), how can I do that? Is it possible with the ui-template node?
No you can't create groups dynamically anyhow. The ui_template itself must be in the group to be rendered and ready to receive messages and do stuff.
I have removed irrelevant tags to avoid confusion.
Okay can I select an already existing group from a text dashboard node depending on a msg.payload value?
Can I select an already existing group from a text dashboard node depending on a msg.payload value?
Can you give us some more information, exactly what are you trying to get the dashboard to do?
In a text node, you cannot specify parameters for the dashboard group. I have created different dashboard groups (Group1, Group2,...) and would like to set the dashboard group of a text node to a specific group (z.B. Group1) depending on the value in msg.payload (e.g. Group1, Group2).
OK. Why do you want to move a text node from one group to another?
Maybe an image of what you are trying for would help me understand.
I want to put the visualization (all the dashboard nodes) in a subflow, so that i can reuse and then visualize data according to what the subflow gets as the input
I don't use subflows so this is mostly guesswork.
You can use a ui-control node to hide or reveal groups Disable a dropdown node on the basis of a switch node result - #11 by E1cid
So maybe you could have several groups, each with the same set of text fields.
The subflow could populate the fields in your chosen group and reveal it, hiding the others.
That's another thing you can't do. Well you can do, but it doesn't work.
Okay good to know thanks, object-oriented programming does not work well in node red, does it?
The limitation on dashboard nodes in subflows is not a node-red issue, it is specific to the dashboard nodes, which are not part of the node-red core. There is work starting on a successor to the dashboard. If you have specific requirements I suggest you make those known via the link in that document.
At the moment, for more sophisticated UI requirements than the dashboard can cover, you can use uibuilder.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.