SubFlows and DB2 - environment variable

Hi,

I'm only starting to play with SubFlows with Dashboard2 , that looks really powerful !

I had no problem to set the subflow variables to choose the group, and use a label from that variable, but I'd like also to use that variable to specify msg.topic coming from the nodes... Maybe there is a specific typo to use it correctly, but for now here is what I get :

and the sub-flow config :

Or maybe I just need to use a change node in the subflow for the env Variable ? then I'd use topic for the node information, and another msg property for the env ?

Any idea ?

Thanks in advance

You cannot do compound env vars like top1 ${label} in a text field (you can in an env $ field)

Ok thanks. so I need to find any way to append the env vars to msg from the subflow.

Since it's a typed input field for the topic, you could also try a JSONata expression to compose the string and the env var. :thinking:

Yes thank you. I m not that much in JSONata, but I found a working solution.

Another question related to subflows and DB2 nodes: I got the set up working nicely, with a few instances of a subflow which includes several DB2 nodes.

Question is, how is the layout of all these nodes in subflows managed ? As far as I can see there is no tool to control the layout, and at some point when I changed the group size, I got quite a mess with the DB2 nodes layout....

Any experience to share ?

Thanks

Multiple ui nodes in a subflow is not yet fully supported, there is no convenient way of specifying the order. See Widget ordering in subflows · Issue #1062 · FlowFuse/node-red-dashboard · GitHub

Great, I really hope it will be adressed soon. I had a look into the relevant issues on GitHub and could see I'm not the only one waiting for it.

The concept is really powerful, will be really great once that stuff is solved.

Anyway for now, as soon as I have all sub-flows instances in a group without anything else, I can deal with it.

Please add a comment to the issue so that is clear that others would like to see this sorted.

1 Like