$env() variables in normal flows - checking

(I'm a gluten for punishment.)

I've decided to make more subflows.
But while making them it is sometimes better to have them in the real world so I can watch what is going on in/with them.

env$() that would be ..... equivalent to global or flow context?
I'm guessing flow but want to check before the hole gets too big. :wink:

While I have the impression, you love subflows :wink: ... there's really no need (anymore) to use them that intensively.
You may use the link-call nodes to do almost the same - but (from my perspective) easier to implement & to maintain. If you like to have these (called) flows being separated, just put them on a separate tab. The link-call node is able to call (link-in nodes on) other tabs as well.

Subflows and I are only new acquaintances.

Originally I wrote EVERYTHING on the tab level.

But when I have things like:

Each of those columns of indicator and .... 7 buttons. It was a LOT of code and if I changed one: I had to change them all.
This became painful after a few months of trial and error in my early days.

Then I have things like these:
(not all but they are used a lot)
Event lists - as I shall call them.*

This one they are mostly collapsed. But you can see their similarity.

Those EVENT lists are somewhat big.

And if I change one: (you guessed it) they all need updating.

For the most that is not too hard, but some are subtly different and can cause grief if I forget that when rolling out updates.

I am NOT a programmer, but am learning how to better structure code. (Well, I hope I am)

I don't think the link call would work as there are a few parameters sent to the EVENT list.
Then thre are the controls.:
Displaying / Logging / Clearing the list / filtering and so on.

How do you send the parameters and events?

Complicated message structures for inputs for things like buttons, etc.

But for fixed things like .... say: computer names..... I will use env() in the subflow's node settings.

But I want to check how I can test that at the flow level.
Where do I set the env()?
I know that is an obvious question, but I just want to be sure before I start spending too much time on it learning.

You can set environment variables on a flow via the flow's own edit dialog:

1 Like

Those would be exactly the same using a link call rather than a subflow. It is the configurable env vars you would lose, those would have to be passed in the message too.

Sorry Nick, but I am exploring things and have fallen into another Rabbit hole with this.

After recent events and subflows, and getenv() I am referring back to this and things don't make sense.

I'm asking you only because ........ I am now at a loss to whom I can ask and get a helpful reply.

If I am reading what you said (and can see) how to set env$() variables, I seem unable to test accessing the values.

At this stage, I am using the change node to test recent things told to me.
But the whole thing seems wrong.

When I move to the tab and am about to double click I see confusing information - but that's another thing. Sorry.
I open the window as you show and set the environment variable.
But I'm stuck how to access it.

I'll shut up here, as I fear I am now only typing words/characters and not really helping my situation.

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