Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to avoid group approvals, if the manager is part of that group who already approves it.

Ak8977
Tera Expert

While submitting a request there is a variable called manager, it sends the approver to the manager once the manager approved the it goes to one 'xyz' group. if the manager approves the request then we need to skip the group approval of the request as he was already present in that group.
note: manager approval was coming at request level and group approval was coming at ritm level.

1 ACCEPTED SOLUTION

Hey @Ak8977 

So if that is the case, you can modify a little bit to achieve it.

In the Look Up Group Member Records step, query with the Approval Group and the previous Approver.

Timi_0-1701684508693.png

 

Then if there's no records found, we Ask for Approval from the Group.

Timi_1-1701684541388.png

 

And, just do your next steps below.

 

Cheers,

Tai Vu

 

View solution in original post

9 REPLIES 9

@Ak8977 

script is not handy

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

Tai Vu
Kilo Patron
Kilo Patron

Hi @Ak8977 

Yes you can achieve it. Let's try the below approach to filter out someone from the approval group.

1. Query to the Group Members [sys_user_grmember] table.

2. Add the condition User is not the Manager, then collect all the rest Users that are members of the group.

3. Use action Look Up Records, query to User [sys_user] table with the above users

4. At the Ask for approval action, drop the Users record return from the step 3.

Sample.

Timi_0-1701662381368.png

Timi_1-1701662392382.png

Timi_2-1701662408284.png

 

You can also build your own custom action to do filter out the previous approver and collect the member sys_id. 

 

Cheers,

Tai Vu

 

Hello @Tai Vu ,
Thank you for your reply.
But, I don't want to send approval to the group if already one of the member approved the request item.
for suppose 'x' is the manager in abc group. 
If he approves the request then we need to skip sending approvals for whole abc group.
thanks,

Hey @Ak8977 

So if that is the case, you can modify a little bit to achieve it.

In the Look Up Group Member Records step, query with the Approval Group and the previous Approver.

Timi_0-1701684508693.png

 

Then if there's no records found, we Ask for Approval from the Group.

Timi_1-1701684541388.png

 

And, just do your next steps below.

 

Cheers,

Tai Vu

 

Thank you very much @Tai Vu