- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 03:27 AM
Hi Team,
I have created on catalog item, that item contains the MRVS, inside the MRVS we have the approver's values. i am sending the approvals by using the Flow designer, for MRVS to get one by one approval i used FOR EACH Logic ,the approval records created but I WANT TO CRATE THE ALL APPROVAL RECORDS AT A TIME.
Ex: MRVS contains the 5 records now we have 5 approvers i need to create 5 approvals records same time.
If any one knows could pls help on this
Advance thanks Team
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 03:35 AM
I believe you want to fetch all the approvers i.e. combine all from each row and send only once?
If yes then you can use flow variable and store the approvers in it and then use Ask for Approval flow action
Please start with the above and let me know if any help required.
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
02-10-2025 03:44 AM
Thanks @Ankur Bawiskar
to store all the approvers right now we don't have the particular flow variable as per my knowledge. Is any flow variable is available to store 2 or more values. In single flow variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 03:47 AM
you can create flow variable of type string and then while setting you can concatenate the approvers from each row of MRVS when you parse
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
02-10-2025 08:44 AM
Actually Its not creating one after one. The 2nd is waiting for the first approval response once it is full filled then only its going to create 2nd approval. That's what the issue for me and that's where I am struggling.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 03:43 AM
Hi @Venky Kshatriy2 ,
will suggest you to replase for each condition with Custom Script Action.
and use following script:
var mRVS = current.variables.mrvs_field_name;
var approvers = [];
for (var i = 0; i < mRVS.length; i++) {
var approver = mRVS[i].approver; // Replace with the field that contains the approver's record
approvers.push(approver);
}
var approvalGr = new GlideRecord('sys_approval');
approvalGr.initialize();
for (var j = 0; j < approvers.length; j++) {
var approval = approvalGr.createRecord();
approval.request = current.sys_id;
approval.approver = approvers[j];
approval.state = 'pending';
approval.insert();
}
return 'Approval records created successfully';