Looping through node until no missing values in column

I have a node that if a cell in a column is missing a value it looks at a reference cell and then grabs the value from that line to fill in the missing value. I want to iterate through a loop until there are no missing values in the column. I started with a “Generic Loop Start”, I use “Statistics” to grab the number of missing values in the column, and am looping until that number =0 using the “Variable Condition Loop End”. For some reason the table isn’t getting modified after the first trip through the loop. Ideas?

You might have to use a recursive loop or store the intermediate results in a table and read that table back at the beginning of every iteration

1 Like

Hello @AndrewDeacon,

not sure you need to use loop in this case. Can you share some example with data?

Br,
Ivan

Column A:
A
null
null
null
B
null

Column B:
null
row 1
row 1
row 2
null
row 5

Column A is the required value. I want to loop until there are no nulls in Column A. Column B tells the program where to look to grab a value if Column A is null and grab the corresponding Column B.

One time through the loop, Column A should be:
A
A
A
null (the null from row 2)
B
B

Column B:
null
null
null
row 1
null
null

And then one more time through the loop would grab that last value, there wouldn’t be any more null values in Column A, and the loop would exit.

Sorry about the convoluted explanation, but hope that helps.

Hello @AndrewDeacon,

have you had any success with your task?

tnx for additional explanation. I get it know but unfortunately don’t have different idea/solution from @mlauber71’s. Either use recursive loop or generic loop start in combination with Variable Condition Loop End node where variable holds number of missing values in column A. (In which case you also have to store intermediate results.)

Br,
Ivan

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