Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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 ?

1 REPLY 1

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.