- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2025 12:46 PM - edited ‎08-06-2025 12:51 PM
I'm attempting to generate some number of approvals on a Requested Item where the Users, and the number of them, who need to provide approval, will vary with every run of the Catalog Item. I want all these users to have the approvals generated at the same time. Not serially where you have to wait for one to get the next approval request issued. If anyone on the list reject, the item is rejected. In the Flow that is triggered by the Service Catalog, I have gathered the sys_id of the user records into a comma separated list (string) as a Flow Variable. I have created a custom action that converts this list into a List of Records which, seems to be the only data type the Rules field accepts. For testing, these are valid/active users with at least the approver role. When the flow runs, none of the approvers are added and, the debug session shows Approval State "skipped" and I cannot figure out why. I cannot figure out why I get no approvers for the record in sysapproval_approver. I would like to use this method but, in attempt to make some progress, I removed that logic and replaced it with a GlideRecord script to insert the approvers in a for each item loop. All the approvals get created but, whether they approve or reject, the RITM is left with an Approval value of "requested" so, my Wait for Condition step waits. I'm not sure what else to try as I thought my initial attempt to use Ask for Approval, using an array of user sys_id, would work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2025 10:38 PM
Hello @JamesLindsay
I'm back with more simple solution of scripted approvals
Here is how you can simply achieve this
1] Create a flow variable:
create a simple string flow variable
2] set the flow variable (here we will split the list collector to array of sys id)
add the following code using toggle script
var user_list= fd_data._1__get_catalog_variables.users.toString().split(',');
return user_list;
3]now add action as ask for approval
in the ask for approval, click on same toggle script and add following code
var approvers = fd_data.flow_var.variable;
return "ApprovesRejectsAnyU["+approvers+"]";
This will work like magic
you can add if condition to update the ritm based on approval or rejection
for any more refernece of scripted approvals, visit the following link:
Kindly mark this as helpful and accept this as solution if this helps
Thank you
Gaurav Vaze
Servicenow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2025 01:21 PM
That should work. If you do decide to use Catalog Builder, you can create a new approval subflow to operate the way you're wanting it to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2025 04:00 AM
Well, it didn't. It works in terms of generating all the approvals at one time but, the rule to Approve or Reject where all user must approve sets the RITM to approved and the other approvals to no longer needed when any one of the multiple approve. The desired behavior is all must approve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2025 05:26 AM
I know that kind of custom approval is readily available in Catalog Builder. Maybe try that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2025 05:44 AM
Yeah, I guess I will. I'm just really bugged that the OOB "Ask For Approval" won't take my List of Records (User Sys_id) and process it the same way it processes members of a group. Everything I've looked up says it should.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2025 05:53 AM
This is a good requirment which includes good flow logic
here how you can address this
Part A] Converting the sys_id list
access this post: https://www.servicenow.com/community/developer-blog/using-list-collector-in-flow-designer-for-each-l...
credits @ankurbawiskar
Part 2] Now that you have the array of the users,
since you do not want to wait on ther approval states
so what alternative way is to add this users into a temparary group, which has approver role
then ask approval to this group
add rule as anyone rejects
part3] Add condition to check approved or reject
remove the users from this temporary group to avoid confusion(this is important as there can be multiple RITMs)
part 4] remove the group from any group approval notifictaion so that we keep the group as no disturbant as there will be approval notification already being triggered
This is a custom way to meet your requiment
mark as helpful and accept as solution if this helps
Thank you
Gaurav Vaze
Servicenow Developer