ForEach Loop Not Working
Comments
-
Hi,
Im having an issue with a flow not behaving how Id like. I am running a ForEach loop where it appears that the ForEach step doesnt iterate through the collection Im passing it. I have a rule within my ForEach loop that if true" will go back in the loop and "if false" will carry forward without going back to the loop. When the flow reaches the loop it seems to do nothing and immediately take the "done" path. Does anyone have any suggestions?"
-
Hello,
It sounds like the problem is with how your rule is set up in the flow. When the if false" path is taken then the loop is left open which is likely causing your issue. You should use the "Reset ForEach Step" (found under flow management) to correct this behavior.
If you dont have a "Reset ForEach Step" in your flow and you leave the loop then the ForEach step will "remember" what item in the collection it was on. The next time your flow runs then the ForEach step will begin at value X (the same spot in the collection it was on previously). After adding the reset step your ForEach loop will iterate through your collection from the beginning each time your flow runs.
Let me know if this works for you."
-
That worked well - Thanks!
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions