Flow Designer | Do the following until loop | limit iteration number

gabriel_sk
Tera Contributor

Hello guys,

I have an issue with Flow designer and "Do the following until" loop...

Situation:
I have a subflow that run a "do the following until" loop containing an action and a "wait for duration of time" condition.
I would like this loop to run just 3 times but I cannot find the way to specify this in the until condition.

I believe this is a quite easy requirement that could be accomplished with an OOTB solution but I cannot achieve this, maybe I am missing something...
I thought to create an output variable from the action and have the value increase but each time the action run the value is overwritten... also I cannot edit the action output value in the subflow.

Any suggestion?

Thanks a lot!

11 REPLIES 11

DrewW
Mega Sage
Mega Sage

Create a counter action that has an input for the start value and an output for the current value.  Just add one to the value in the action.  Then that will give you an output to check to get your count for your "do the following until".  The reason I am suggesting a separate action is so you have something to use again if needed.

So something like this works, at least it tested ok.  So basically you have a counter to start outside the loop that sets the count to 0 and creates a storage place for the current value.  Then as you see in the Counter input you just add one and store it in the first counter and return it so its passed into the internal counter.  You really do not even need to have the action do anything except have an integer input and an integer output.
find_real_file.png

 

 

gabriel_sk
Tera Contributor

Hello Drew,

Thanks for the reply!

I tried this but the action output (the counter current value) that get increased during the loop does not store the new value. As result, each loop generates the same number.
(I am testing this on New York instance, and using a sub-flow instead of a flow).

If the solution works for you, I may be doing some mistake on my end.


I have created an action containing 1 input and 1 matching output integer variable. The action is placed outside the loop and a new instance of the same action is added within the loop itself.
The input of this second action is the output of the first one increased by 1.


Thanks:)

I was using an Orlando Patch 1 instance.

I did not get this working either, tried on Orlando Patch 4 and Patch 0.

Finally I ended up by saving this loop variable into record.