Subflow environment variables

how to pass global variables as a property (ENVIRONMENT VARIABLES ) of a subflow in node red


Why would you need to, all the globals would be available in the subflow anyway.

You could just pass on the name/path of the gloabal you wished to use in the subflow, as a string input.

I have subflows that are used in an other parts of the project any modification in their internal nodes can modify their fonctionality so entring a global variable , a flow variable ... to the input of env variables would solve the problem and would solve many problems in the future as it allow you to conserve subflows and only change their input

But there is no option for global input.

So as i said you would have to set the global path as string. Then in your subflow use that string to retrieve the global value you required. You will need to edit your subflow template.

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