Skip approval , If requestor is Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2022 07:18 AM
Hey Developers,
I'm trying to Automate , Group creation , Role addition to the group , User Addition to the group.
I have created this simple WF.
I wish to add an Approval Activity.
Where, If requestor is Manager then skip the WF. Do the changes and close the task.
If requestor is not Manager then it should wait for an Approval of the Manager.
I'm confused how to do this.
Should use "User approval" or "group approval".
What would be the code and how to set Task to closed state.
Please suggest & guide.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2022 07:29 AM
Hello,
Have found two good threads for you, go through it, Mark my answer as correct if that helps
https://community.servicenow.com/community?id=community_question&sys_id=8cb0bcfbdb9aec506621d9d968961951
https://community.servicenow.com/community?id=community_question&sys_id=77808d231bb60910be4955fa234bcb4a
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2022 07:35 AM
Hi,
What would be "Your Value" here?
Can i use, current.variabbles.name?
Below is snap on how it looks on Portal.
var approver = 'your value';
if(current.request.name == approver)
return 'no'; // output of this goes to next activity by skipping approval
else
return 'yes'; // output of this goes to approval activity
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2022 07:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2022 07:44 AM
What is requestor is manager means ? Requestor Manager is requestor himself ? or there is checkbox on user table which says Manager like that ?
Regards,
Musab