flow designer for each loop, how to add logic to close Request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2021 07:01 AM
Hello,
I have a for each loop to add users to AD group, and that works fine.
However, I need to add logic to the flow, so the request is closed if users are added to ad group successfully.
It does not have to be all the users from list collector, but as long as some are added I want the request to be closed complete.
Now if i add the if logic to check if status was success within the for each loop then it will change the state of the request for each user it adds?
see my flow below, where I have moved the if step and update record step out of the for each loop...
, but here also it does not work. as the runtime value does not equate to success, but equates to {0}??? im not sure why this is, maybe because I am checking outside the for each loop?
ccan someone provide a suitable solution here please?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2021 07:39 AM
Hi Khalnayak,
It's actually very easy to do. Simply add an End-flow logic action into the for each loop. The End-action will terminate the flow immediately and skip future iterations of the for each logic.
See documentation here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2021 07:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2021 08:01 AM
Hi Khalnayak,
Sorry I misunderstood your question. I don't know a way to halt after the current iteration in for each-loops.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2021 01:31 AM