Editing Flow Variable in Loop not working.

Hi,

I'm trying to fetch some records from rest API using offsets parameter in the URl.

- I'm using interval loop start to step with "offset" parameter as my Flow Variable

- I extract the Flow Variable and add the fetched Rowcount to it, so in the next iteration flow variable is changed to offset+rowcount (fetched from previous iteration)

- Using inject variables node I insert the new updated variable into data [this step is not working in KNIME], it merges and uses the old flow variable value.

(Attached is the screen shot for reference). 

Not sure if there is a better way of doing this. Appreciate any help. Thanks !

Hi Mohammed,

Flow variables which you are changing in the loop are not sent back to the loop start node. And they don't have an effect to after the loop, because the loop body is separated from the rest of the workflow.

Best, Iris 

Hello,
You can save variables to file (eg. csv) before loop starts, then read the variable (from file) at the beginning of loop and write new variable (overwrite variable file) at the end of the loop. This way you have variable from previous iteration.

Thanks Iris and rchar01. That works for me.