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.

Setting Approval Rules via script in 'Ask for Approval' action in Flow Designer

Abhinandan Pati
Giga Guru

Hello everyone,

I am trying to fetch approvers and set approval rules via script in 'Ask for Approval' action of Flow Designer. I want request to get approved/rejected, if any one approver approves/rejects it. I tried below 2 strings for setting approvers and approval rules.

return  "ApprovesAnyU[a765dc951bfd60184a7186e8dc4bcbd5,dfc59a2adb45acd4348e70bf299619dc]OrRejectsAnyU[a765dc951bfd60184a7186e8dc4bcbd5,dfc59a2adb45acd4348e70bf299619dc]";

return "ApprovesRejectsAnyU[a765dc951bfd60184a7186e8dc4bcbd5,dfc59a2adb45acd4348e70bf299619dc]"

With these strings it's attaching approvers to RITM but it's waiting for approvals from all the approvers. I want flow to move forward if any one approver approves/rejects it.

Am I missing something here. Anyone of you faced similar issue? Any input will be of great help!

Thanks,

Abhinandan

@Chuck Tomasi @Ankur Bawiskar @Göran Lundqvist @Pradeep Sharma @Mark Roethof 

1 REPLY 1

Ramesh25
Tera Contributor

Can you try, something similar to this:

return 'ApprovesAnyU[' + sys_ids + ']OrRejectsAnyU[' + sys_ids + ']';