- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 08:21 AM
I have a Catalog Item with a Multi-Row Variable Set (MRVS). I need to iterate through all the records in the MRVS, and create an Approval for each Owner (one of the fields in the MRVS).
I was able to start this, and make sure that the loop is working correctly. Currently, I have it loop through all the records, and have it log the Owner field value. That is working perfectly, so I know my loop is good. Here is what it looks like:
Here is the caveat/tricky part: Many times, the Owner will be repeated. I only want one record to be created per Owner.
For example, if I have 4 records in my MRVS, and the Owner for each record looks like this:
Record | Owner |
1 | Adam Allison |
2 | Barb Berry |
3 | Chris Curtis |
4 | Barb Berry |
I only want to create 3 approvals, not 4 (Barb Berry will get just one approval, not two).
How can I do this in my Subflow?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 04:49 PM
Hm, thinking about it, if you need only an approval, you can simply go with the following solution:
A simple "All users approve" is sufficient. It will create an individual approval for each "owner" and go to the next step only when all users approved.
Would this work for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 12:40 PM
OK, I found the error. I needed to add a comma here in this step (I missed that in your original image):
But now I have having the issue you mentioned, where it is only creating one approval at a time (it will create the second when the first is complete). I am not sure how to complete this step you mentioned:
"To do the approval concurrently, you would need to create a new subflow which only contains the approval (and probably a syncronization variable so you know at some point that all approvals have happened). This subflow can be called with "Wait for Completion = false" so they run in parallel."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 04:49 PM
Hm, thinking about it, if you need only an approval, you can simply go with the following solution:
A simple "All users approve" is sufficient. It will create an individual approval for each "owner" and go to the next step only when all users approved.
Would this work for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:51 AM
No, that still does the same thing.
Just to be clear, what I want to happen is that it generates 3 separate approvals at the same time, one for each person (Adam, Barb, and Chris).
The original suggestion and this new one creates one a time, and waits for it to be approved/rejected before going on to the next. I don't want to do that. I want all 3 at once.
I can create Wait steps to make sure all are approved/rejected before proceeding with the rest of the workflow - that is not a problem, I have done it before. The issue is trying to consolidate any duplicate users and create multiple approvals at the same time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 12:55 AM
@jmiskey wrote:Just to be clear, what I want to happen is that it generates 3 separate approvals at the same time, one for each person (Adam, Barb, and Chris).
This is exactly what happens (if configured like i described): One sysapproval_approver record is created for each person. In the flow, there is only one Approval Action which is completed only after everyone has either approved or rejected their individual approvals.
I've created a proof of concept:
As you can see, the System Administrator is appearing twice. But the outcome is only one approval for him:
@jmiskey wrote:The original suggestion and this new one creates one a time, and waits for it to be approved/rejected before going on to the next. I don't want to do that. I want all 3 at once.
You get this by configuring the "Approval" Action with the Rule "All users approve" (what I've highlighted in my previous reply).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 05:12 AM
Ah, I found the issue. I was focusing so much on the Approval record, I failed to notice that I had it within a For Each loop (from my original attempt). I got rid of that loop, and it now works like you suggested.
Thank you very much!