Conditional loop

dear Knime users,

I would like to execute a loop based on a flow variable.
I have to add the values from a table to a flow variable until it reaches the value of a an other flow variable.
I guess, I need to use table row to variable loop start, but cannot figure out how to build the condition so that it stops at the required step.
Thank you

Hello @HarryKl and welcome to the KNIME community.

‘Variable Condition Loop End’ can be your ally node for this task.

BR

4 Likes

Thank you for your answer.
I have some problem with the setting up the condition. I need to stop the loop when a it reaches the value of a variable, but i can type an exact number only, cannot refer to the value of a variable.
I mean the loop should be stopped when myVariable =myOtherVariable.
Thank you

@HarryKl

In the link to NodePit provided in previous post; you will find up to 57 examples of the conditional loop implementation.

If you can explain some more details of your challenge, or -even better- provide a mock data example of the task. It will be easier to help you on finding a suitable configuration.

Regards

3 Likes

Indeed. I will look at them, and I will ask more precisely in case I still have issues.
Thanks for your answers.

2 Likes

Hello @HarryKl,

and welcome to KNIME Community!

Then you can use Rule Engine Variable node to test equality of two flow variables and create new flow variable (with value “stop” for example) which you’ll use in Variable Condition Loop End node as stopping criteria.

Br,
Ivan

2 Likes