- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
var approvers = fd_data.flow_var.groupmanager;
return "ApprovesAllU[" + approvers + "]";
This correctly enforces all approvers must approve before proceeding. I also need: if anyone rejects, the flow should go to the reject branch and reject the RITM. Here the reject branch is not working. So, what is the solution to work both of the conditions ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @BiswalNayak ,
You can configure this as per the below screenshot:
Or if want to use script:
"ApprovesAllU[" + approvers + "]OrRejectsAnyU[" + approvers + "]";
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @BiswalNayak ,
You can configure this as per the below screenshot:
Or if want to use script:
"ApprovesAllU[" + approvers + "]OrRejectsAnyU[" + approvers + "]";
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hello @BiswalNayak ,
This can be handled using Approval/ Rejection rules in the flow designer. Why to go with coding ?
It's always recommended to minimalize the use of code especially while using flow designer.
Regards,
Nayan
If my response has helped you, kindly mark it as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Thank you for your response, Nayan. I completely agree that minimizing code in Flow Designer is the best practice.
In my case, the challenge was that the variable I’m using is a List Collector that stores selected groups. The requirement is to send approvals to the managers of those groups, but Flow Designer doesn’t directly resolve group managers from a list collector variable. Because of this, I had to use a script to dynamically build the approval rule string (ApprovesAllU[...]) with the user sys_ids of those managers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
This code is working fine. Thanks @ Anand2799 for your quick response.
