Configuring the Ask for Approval Flow designer action to not trigger to the user if user is a member
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi Everyone,
We have a flow attached to the Catalog Item. I need to trigger a Group approval in the flow using the Ask for Approval flow action, but the approval should not be triggered to a user if the user is the requestor and a member of the approval group.
Please pour your Insights
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Use a business rule or flow to set the user in scope as 'No Longer Required'.
This will stop the user from approving but keep the group approval record open.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
You can't tell "Ask for Approval" flow action to not include a particular member from group.
you can use before insert business rule on sysapproval_approver table to ignore the insert if your condition matches
BR: Before Insert on sysapproval_approver
Script:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var ritmSysId = current.sysapproval;
var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", ritmSysId);
gr.addQuery('cat_item.name', 'Your Item Name'); // give your catalog item name here
gr.query();
if (gr.next()) {
var requester = gr.request.requested_for.toString();
if (current.approver.toString() == requester || gs.getUser().getUserByID(requester).isMemberOf(current.group.toString()))
current.setAbortAction(true);
}
})(current, previous);
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
another way is to use scripted flow approval and get all the group members and don't add that member if member is requester of that RITM
Scripted Approvals in Flow Designer with Flow Variables
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Thank you for marking my response as helpful.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader