Group Manager approval from the results of multi row variable set using flow or sub flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi Everyone,
I have a requirement as follows:
Approval should be triggered to individual group managers(i.e., Managed By Group - Managers) if the user created multiple entries in MRVS.
1. I created a Multi Row variable set with
Windows Server - Reference (Windows Server table),
Managed By group - Reference(Group table),
Owned By - Reference (User table)
Below is the screenshot:
Currently i created a flow and tried to trigger the individual group manager approvals(Managed By Group - Manager) once the request is submitted, but, no luck. i tried with many ways using lookup records and could not find any solution for this.
Created the flow as below:
Can someone help me at the earliest here, is it possible to achieve this using flow or sub flow? If yes, kindly help me with steps to fulfill this requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @nagarajuk0917 ,
1. Trigger your Flow when the Catalog Request (RITM) is submitted.
Add “Get Catalog Variables” to capture the MRVS variable.
Use a Script Action to parse the MRVS JSON into rows:
var mrvs = JSON.parse(inputs.mrvs_variable); // MRVS input
outputs.rows = mrvs; // now available for For Each
Use this to break the MRVS JSON string into rows you can loop through.
Step 2: Use a For Each activity on outputs.rows
Within the loop, extract:
Managed By Group (reference field)
The group's manager (gr.getValue('manager') via Lookup Record).....This enables dynamic per-row approvals.
Step 3: Ask for Approval Per Group
Inside the loop:
Invoke an Ask For Approval action targeting the group's manager.
To avoid duplicate approvals for the same manager (when multiple rows have the same group), use a Flow variable (e.g., ProcessedManagers) to track processed groups, and add a condition to skip duplicates.
Check below articles:
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
you want to wait for approval from Manager of each MRVS row?
OR
you are ok to grab all the managers and then send approval to all at once and even if 1 person approves, you wan to proceed?
If you want 2nd approach then do this
1) create a flow variable
2) set the flow variable with array of managers by parsing the MRVS JSON
3) then use scripted approvals
check this link
Scripted Approvals in Flow Designer with Flow Variables
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@Ankur Bawiskar : I want to wait for approval from Manager of each MRVS row and this approval should be triggered to all the group manager at once.
And also, if there are any duplicate group managers - approval should be triggered to one unique entry instead of multiple approvals for each group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
so you can take 2nd approach I mentioned using script, there you have the flexibility to remove duplicate from array before sending the approval
Ensure you select "All users approve" in "Ask for Approval" flow action
I believe I answered your original and subsequent question as well.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader