Need to restrict the assigned to user in request approval group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 04:35 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 05:20 AM
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
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 05:36 AM
I had done the entire process using flow designer. Can you please help me to solve it using flow designer action (scripting section).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2023 12:22 AM
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.
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 05:42 AM
didn't get your requirement.
What do you mean by restrict?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader