Need to restrict the assigned to user in request approval group

praveen_rajan
Tera Contributor

Hi team,

We have a requirement to send the approval request to assignment group members (eg: Abel t.., Abraham l... and etc...) Using Flow Designer. The task is user in the assigned to field is unable to approve the request. We need to restrict approval from the user who is in the assigned to field. Could you please help us in achieving this requirement?

 

Regards,

Praveen.

8 REPLIES 8

Ahmmed Ali
Mega Sage

Hi @praveen_rajan 

 

I am not sure if it actually feasible in flow designer, but you can easily do it in workflow. You can use user approval activity and in script part, query sys_user_grmember table with group as current assignment group and user not equal to current assigned to.  then just add all users to one array and return that array.

 

Any particular reason for using flow?

 

if you really want it in flow only, then I guess you can create one custom list type field and write a BR to populate that field with group members excluding the current assigned to user. then use that field as approver in flow designer.

 

Thank you,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

I had done the entire process using flow designer. Can you please help me to solve it using flow designer action (scripting section).

I am not sure if there is any better OOTB way, but one way would be as I told earlier

 

if you really want it in flow only, then I guess you can create one custom list type field and write a BR to populate that field with group members excluding the current assigned to user. then use that field as approver in flow designer.

 

Create a custom list type field in your task table and have it reference to user table. Write a BR on the task table insert/update and condition as assignment group changes/assigned to changes. in script, query sys_user_grmember table for the group members of current assignment group expect the current assigned to user. then set all those users in your custom list type field.

Now you can refer list type field in approval activity by dot-walking on the task table in flow designer.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Ankur Bawiskar
Tera Patron
Tera Patron

@praveen_rajan 

didn't get your requirement.

What do you mean by restrict?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader