how to exclude an approver from group approval if they are opened_by or requested_for>Manager

kdelbridge
Tera Expert

I am trying to figure out how to exclude an approver from being a part of the group approval if one of the following conditions exists:

  • an approver within the approval group is the opened by 

OR

  • an approver within the approval group is the requested_for > manager (they have already approved at the manager approval step called for earlier in the flow, so we do not want to ask for another approval of them

We STILL need the group approval, we just simply need to "exclude" an approver of the group being able to approve request if one of those conditions is met

 

I created a subflow where I tried to update the approver's approval record state to = not_required. but that did not work.

It still included them in the group approval requests and it actually ended up having them "auto approving".

 

Any ideas how I can get this to work?

 

7 REPLIES 7

@kdelbridge 

Did you get a chance to check my below response?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@kdelbridge 

2 ways

1) use scripted approval and exclude that group member you want based on your logic and then use that in Ask for Approval

Scripted Approvals in Flow Designer with Flow Variables 

OR

2) use before insert business rule on sysapproval_approver table and check if the approver is opened by for RITM or is manager of requested_for for RITM, if yes then abort the insertion using current.setAbortAction(true)

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@kdelbridge 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader