How to request approval from Manager and Secondary Manager (custom field)

Saquib Mohammed
Mega Guru

Happy New Year

I have a been asked to create a flow which needs approval from the assignment group's manager and a custom field secondary managers (u_secondary_managers) that I have added to the groups table (field type is List since there can be more than one secondary managers). If any of them (either the manager or any of the secondary managers) approve the requested item, the flow should proceed to the next step.

Any pointers on how to solution this?

Thank you

2 ACCEPTED SOLUTIONS

Saquib Mohammed
Mega Guru

Here is something that I tried. I used the Ask For Approval Action and under the Rules, i added below script - 

var prim_approval=fd_data.trigger.request_item.assignment_group.manager;
var sec_approval=fd_data.trigger.request_item.assignment_group.u_secondary_managers;
return "ApprovesAnyU["+sec_approval+"]"; /* Test this with prim_approval and sec_approval variables
This works when i use EITHER  prim_approval OR sec_approval variable but DOES NOT work when i try to use both like this - return "ApprovesAnyU["+prim_approval+sec_approval+"]";Screenshot.png

View solution in original post

Saquib Mohammed
Mega Guru

All I had to do was use both the variables CORRECTLY 🙂

return "ApprovesAnyU["+prim_approval+", "+sec_approval+"]";

View solution in original post

2 REPLIES 2

Saquib Mohammed
Mega Guru

Here is something that I tried. I used the Ask For Approval Action and under the Rules, i added below script - 

var prim_approval=fd_data.trigger.request_item.assignment_group.manager;
var sec_approval=fd_data.trigger.request_item.assignment_group.u_secondary_managers;
return "ApprovesAnyU["+sec_approval+"]"; /* Test this with prim_approval and sec_approval variables
This works when i use EITHER  prim_approval OR sec_approval variable but DOES NOT work when i try to use both like this - return "ApprovesAnyU["+prim_approval+sec_approval+"]";Screenshot.png

Saquib Mohammed
Mega Guru

All I had to do was use both the variables CORRECTLY 🙂

return "ApprovesAnyU["+prim_approval+", "+sec_approval+"]";