How to configure "config" properties for a subflow

Hello all,

I'm trying to create some subflow for my new node .

My problem was, one of my node need a "config" property (a global configuration node) .
Can I use this configuration node in the subflow properties ?

I didn't find how to do, and I need to go in the subflow to configure it manually (and so, the subflow is nearly useless because not always reusable) .

I try to do some search on the forum and documentation about it, but I doesn't find a way to do it for the moment .

Thanks
PS : I'm using node-red v2.2.0-beta.1-git

This is not possible to do today. It has been mentioned a couple times recently, but nothing has happened with it.

oh ...

Any workaround ?

Maybe a previous node to setup this in a variables ? (or maybe in a message send to the subflow, and the subflow can store it only for the subflow ? maybe in the flow var ? )

No. Subflow env vars are evaluated and set at deploy time. They cannot be set msg properties.

Likewise, there's no way in the UI for you to tell a node to use an env var to identify the config node it should be using.

In fact, I'm thinking in term of code ...

Like creating "specifics nodes" that will convert the config to ID string in message (because it's just an id in the code), and at the start of the subflow, another specific node, that will look at the message, and setup a "flow var" (I'm pretty news with node-red, so I doesn't know what are the scope of the global vars)

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