How to skip approval of the member who is requester and belongs to group in Group approval activity of workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2019 11:41 PM
I want to skip approval of member in group who is also requester of request?
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2019 01:16 AM
Hi Kushal,
Create 'If' activity before your approval activity,
Write script to check the requester is member of particular group.
eg. I check manager and Dept VP are same or not. If NO then create the second approval else skip.
If my answer helped you in any way, please then mark it correct and helpful.
Kind regards,
Manas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2019 02:55 AM
Hi Manas,
First of all thank you for inputs:).
But my scenario is bit different where i have to check whether a requester belongs to approval group(which we can implement by scripting) and if requester is part of approval group then only he's approval should get skip(where i am facing challenge) and other members should get approvals as it is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2019 04:17 AM
Hi
In approval activity, click advanced to write the following script,
var groupId = //pass the sys_id of group.
var gr2 = new GlideRecord('sys_user_grmember');
gr2.addQuery('user',"!=",current.variables.requested_for);
gr2.addQuery('group',groupId);
gr2.query();
while(gr2.next())
{
answer.push(gr2.user);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2019 03:10 AM
Helloo Kushal,
Add this code in IF ACTIVITY and If yes then skip approval and IF No then point to approval activity:
answer = ifScript();
function ifScript() {
var reqFor = current.variables.requested_for ; // replace with your value for requester for.
if(reqFor.isMemberOf(current.assignment_group)){
return 'yes';
}
return 'no';
}
Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Abhishek Gardade