Flow Designer 'For each' loop issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 10:55 AM
Hello Experts,
I am new to Flow Designer, I want to send an email daily at particular time to 'Approver' and 'Requested For'. so, I have created a flow with trigger to run Daily at particular time. Flow looks up for approval records that are in 'Requested' state, task type is Requested Item and created on today. And then, I had 'For each' loop and check if each record is approved or not. And, I have another look up on Request Item table (screenshot below) because email should be sent to 'Requested For' as well.
Now, The issue is, I have submitted 3 catalog items so, 3 approval records are created. In my first 'For each' It shows 1 of 3 and in second 'For each' it takes only 1 record and after flow is complete I see the email is sent to only 1 record's approver and requested for but not for other two records.
what could be the issue? And how can I resolve it. Please help!
Thanks,
Rocky.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 01:41 PM
Hi Rocky,
May be easier to do the Flow on the Approvals table (sysapproval_approver) where State = Requested and Source table = Requested Item.
You can then iterate for each item and send notifications to Approver and Approving.Requested for
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 01:58 PM
Hi JP,
Sorry I didn't get you exactly. I wanted to run this flow daily at scheduled time (like scheduled job), And, I see I cannot dotwalk for 'Approving.Requested for' in the flow.
Thanks,
Rocky.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 06:21 PM
Hi Rocky,
Please try this:
1) Retrieve the sysapproval_approver records that are in State = Requested and Approval for.Task type = Requested Item.
2) For Each Approval record
3) Send notification to the Approver
4) Retrieve the RITM reference in the approval record
5) Send notification to the RITM's Requested for
3)
4)
5)
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 02:18 PM
Hello JP,
Did you test the flow you suggested. I am doing almost the same flow right? what's the difference?
Thanks,
Rocky.