Do the following until and For Each (Change Fields)

jiral
Giga Sage

Is it possible to nest For Each flow logic in the Do the following until flow logic? The intent was to keep exeuting the steps until the incident active flag becomes false but inside the loop, it never made it to the For Each part. The iteration limit is set to 1000 so I don't think that's the problem here.

 

jeffiral_0-1724600428227.png

 

Another thing is, the For Each does not seem to work on sys_updated_on. It is returning false even when the Current and Previous values are different.

 

jeffiral_1-1724600602064.png

 

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

Hmm, per your screenshot, which is sort of limited, but it's saying that it did go through the iterations and they maxed out without finding your "until" result.

 

Have you check your records to see if you have a valid record that would be it's "until" result?

 

I don't think the system limits what you can do inside the "Do the following" action, so I think it may be a data issue.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

It's a valid incident record and sys_update_on field is a system field so I don't think it's a data issue. Anyway, I left it to just run on every update instead of working this problem out. In another note, it did run correctly when I use a non sys_*** fields.

Hi,

I meant within the Do the following loop, do you ever get the "Until" in the scenario you're working with. Like have you verified that there is ever an "Until" positive result for it to not error out? If it never reaches it, then it will error with the error you saw which was about reaching max iterations.

 

In any case, it looks like you've resolved your issue by basically avoiding this configuration, so if that works for you, then all good.

 

The point of my response was to say that per the screenshot you showed, the flow is saying that it entered your Do the following loop...and for each loop just fine, but then never found the "Until" end result, so it errored out because it went through the 1,000 iterations.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

It did when I used a non sys_*** fields for the Change Fields.