how to update value between row iterations


Basically this is what I want to do. Anything highlighted in yellow is what I want to compute through knime and anything else is input data. Im having trouble updating the data of row 2 using the data computed in row 1 as shown in the figure
any ideas?

Hello @lama12345
I think this is a job for ‘Recursive Loop’ nodes set :thinking:

unless @Daniel_Weikert hides a trick in his hat

BR

1 Like

Hi again @lama12345,

This is an example workflow for you to achieve what you have explained here:
45546.knwf (17.6 KB)

You can do this by modifying a single variable in each iteration of a chunk loop.

:slightly_smiling_face:

4 Likes

@armingrudd
awesome :tophat:

1 Like

The end result is only the last column right? If so you can do it without a loop

(sorry @armingrudd I borrowed your workflow)

3 Likes

Not a problem at all @Daniel_Weikert.
You are right, actually no loop is needed and to complete column1, the Lag Column node can be used at the end.
I suggested the nodes to @lama12345 in the first topic but created the workflow with a chunk loop to demonstrate probagating variables in the loop.

1 Like

@Daniel_Weikert hello! thanks for your reply, But can u explain further as im not really sure what you’ve done there

I use rule egine to get only th 1 from column 1 while leaving all the follow rows empty, then I add the 3 from column to to have a starting value. I use the second rule engine to get the other columns from coluimn 2 in the same column as I have created (So I get 4,4,5,4). Then I do a cumulative computation
br

@Daniel_Weikert can u show me a screenshot of the configuration of the rule engine nodes

and the other nodes if its not too much to ask :sweat_smile: