Variable filter after merge variable node

Hello,

how could I eliminate the unnecessary flow variables after the Merge Variable Node?

Thanks!

Roland

Hi

You can transfer them into “table row” by using “variable to table row” and then use column filter to omit the extra variables.

Mona

The approach suggested here doesn’t work - you can transfer flow variables to a table using the Variable to Table Row node, but the flow variables themselves still remain.

There isn’t a straightforward way to delete or remove flow variables (see previous forum discussion on this topic here: delete flow variable). As Iris mentions in that thread, a workaround might be to use the inherent local flow variable scope of components (previously called wrapped metanodes in the link) to effectively filter out flow variables created inside them.

Maybe there is a need for something like a “Flow Variable Filter” node. I would be interested to hear thoughts from others in the forum community about it.

6 Likes

Thanks for the clarification!

+1 @ScottF - would be great to have a filter to cleanup variables rather than having to use components and metanodes to drop them off.

2 Likes

Yes, definitely +1 from me for a Variable Filter node.

In discovering the issue raised by the following question, I realised that the ability to filter out Flow Variables would have been the perfect solution!

So it isn’t just a need to remove superflous variables, but a single flow split into different processing streams and then merged back via Merge Variables will always result in the flow variables from the first input stream trumping the flow variables from inputs 2 and 3, as there is no way to filter them out.

From the Merge Variables documentation:

“Note: If there are the same variables defined in different inputs, the standard conflict handling is applied: Top most inputs take priority and define the value of a variable.”

2 Likes

Noted! Thanks for the feedback in this thread. There is more interest in this feature than I would have guessed - we will definitely mention it to the developers. :+1:

3 Likes

Yes I can see the value of being able to remove any superfluous variables… although would suggest keeping any deletions (however this is done) to a minimum to ensure that the flow variablea are available towards the end of the workflow. This helps another future user identify what variables exist and can be used for further development of the workflow (as required). If variables are not carried through then in the future, a second variable for the same thing might be created. Obviously this results in duplication which can be problematic for transparency and overall workflow robustness.

Thanks, Ben

1 Like