Adding approver to the user based role

Community Alums
Not applicable

Hello,

I have a requirement, where parent task will create few child tasks and assign them to different groups and all the child tasks will have group approvals will get attached here when i want to attached the approvals to only the users having specific role, for example child task 1 is assigned to group "X" and group X has 5 members from those members only 3 has a role to approve so only the users should get the approval attached and it goes for all the child tasks. I have created a flow designer  and user look up records on group table and creating child task for all the different groups abut here all the user in the groups are getting approvals attached please suggest how a check for the role before assigning the approval?

 

Thank you,

Prudhvi

1 ACCEPTED SOLUTION

Vasantharajan N
Giga Sage
Giga Sage

Hi @Community Alums - you can use approval rule script to achieve in the "Ask for Approval" flow action. 

 

The below article helps with the Approval rule script development

https://www.servicenow.com/community/workflow-automation-blogs/scripted-approvals-in-flow-designer-with-flow-variables/ba-p/2284506


Thanks & Regards,
Vasanth

View solution in original post

5 REPLIES 5

Vasantharajan N
Giga Sage
Giga Sage

Hi @Community Alums - you can use approval rule script to achieve in the "Ask for Approval" flow action. 

 

The below article helps with the Approval rule script development

https://www.servicenow.com/community/workflow-automation-blogs/scripted-approvals-in-flow-designer-with-flow-variables/ba-p/2284506


Thanks & Regards,
Vasanth

Community Alums
Not applicable

Hi @Vasantharajan N @Ankur Bawiskar , It helped me up to an extent but I want to compare two different group users for example if I am creating a task for group A, I want check all group members are the part of parent group of A, who ever the part of parent group they get approval attached. is that possible in flow designer?

@Community Alums - You can use subflow which can take arguments of groups and can return JSON string which can include the actual members to trigger the approval. 


Thanks & Regards,
Vasanth

@Community Alums 

you can use custom flow action which does this processing and it returns the approvers as per your requirement.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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