Scripted Approval Rules Where Both Approvals are Needed , as from Group1 , and Group 2

shubhamjangid
Tera Contributor

In Flow Designer , i have used OOB "Ask For Approval" Action , and used the scripted query for Approval rules.
So, there are two groups which I seek approval from, Group 1, and Group2 .
Only after getting both approval , I should move the Change Request state to Next one.
but it seems to be not working as expected.
 

The approval rule script return query as:- 
ApprovesAnyG[A]&AnyG[B]OrApprovesAnyG[C]&AnyG[D]&AnyG[B]OrApprovesAnyG[P]OrRejectsAnyG[A,B,C,D]

here whenever it gets one approval , it approves that flow action and completes that. hence the state is also moved afterwards. [but i have asked two of the approvals ApprovesAnyG[A]&AnyG[B] in "AND" condition here, still it didnt seek approval from both.

can you help me in this ?

2 REPLIES 2

Its_Azar
Mega Sage

Hi there @shubhamjangid 

You can use an condition for this  

 

Use “Wait for condition” after approvals
Use Ask for Approval (send to both groups)
Then add a Wait for Condition step:
Condition: like this

All approvals from Group A = Approved
AND
All approvals from Group B = Approved

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.

Rafael Batistot
Kilo Patron

Hi @shubhamjangid 

 

The OOB Ask For Approval action in ServiceNow Flow Designer does not support AND approvals.

 

Even if you use & in scripted approval rules, the action completes as soon as ONE approval is received. This is by design.

Correct solution:

  • Use two Ask For Approval actions (Group1 → then Group2), or
  • Create approvals for both groups and use Wait For Condition to wait until all approvals = Approved
If this response was helpful, please mark it as Helpful and, if applicable, as Correct, this helps other users find accurate and useful information more easily.