Recursive loop end with more that one output port

I have to keep collecting more than one table at the end of the recursive loop.
How I can do that?

Malik

Hi @malik,

You can write them as CSV files using CSV Writer node with the “Append” mode and after the loop, read the files into the workflow.

:blush:

2 Likes

Hi @malik

there is a version with two output ports available. Would this help?

Cheers, Iris

I will try it. Thanks

1 Like

Hi @Iris
This will not help as its send back the two tables- I want to be able to append different tables in the loop end.
Another question :slight_smile:
I see that in Recursive Loop End i can stop it using the,

  • End loop with variable: the loop ends if the option is enabled and the value of the selected variable equals “true”. However, in the node Java Edit Variable no option to generate a boolean variable ( remember it was before ).

Hi @armingrudd
Another question :slight_smile:
I see that in Recursive Loop End i can stop it using the,

  • End loop with variable: the loop ends if the option is enabled and the value of the selected variable equals “true”. However, in the node Java Edit Variable no option to generate a boolean variable ( remember it was before ).

The variable needs to be of type string and just must have the string value “true” to end it. Otherwise it will run through :slight_smile:

1 Like

Hi @Iris
Ok, I see - I will try it.
How one can create a global integer variable that at each iteration I can modify; such as nmc = numc -0.1*nmc;

Hi @malik

You can generate a variable e.g. with the Math Formula (Variable) and afterwards use it inside the loop to increase it.
In the loop you can use the current iteration value to know in which iteration you are in.

Cheers, Iris

1 Like

Hi @Iris
I have implemented a similar solution using the node “Java Edit Variable”. However, it can solve the problem I have. I need to have a global variable that I can modify and without any connection to the loop iteration.
Knime should have it as it is a very important component in programming.

Malik

But if you have a global variable, which every node can change, your workflow would be very chaotic. Random nodes can change the variable inside the loop. Also if you are reseeing the workflow after ages, how do you know which of the side node did manipulate variables.

This is why we are always following the flow over connections.

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