Alper
Alper7mo ago

Is it possible to have a for or while

Is it possible to have a for or while loop in a flow that feeds the result of the previous iteration into the next iteration? I basically have a list of transformations to apply on the initial input data. Each iteration takes the previous result and applies the next transformation.
5 Replies
Alper
AlperOP7mo ago
do i need to use the shared directory for that? basically looking for something like flow_input.iter.last_result
rubenf
rubenf7mo ago
@Alper you should use flow user states
Alper
AlperOP7mo ago
yeah that works! is there a way to return only the result from the last iteration instead of all?
No description
rubenf
rubenf7mo ago
I would recommend not returning at the end of subflow and set userstate directly avoid unecessary serialization by engine
Alper
AlperOP7mo ago
true, i can just get the userstate in a final step after the loop 👍