The CreatorCon Call for Content is officially open! Get started here.

Skip approval , If requestor is Manager

Naveen87
Tera Guru

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.

find_real_file.png

7 REPLIES 7

Musab Rasheed
Tera Sage

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

Please hit like and mark my response as correct if that helps
Regards,
Musab

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

}

 

find_real_file.png

Trying in this way.

If it's yes, then create a group.

If it's No , then seek Manager's Approval.

 

Please guide me If i have missed something.

find_real_file.png

What is requestor is manager means ? Requestor Manager is requestor himself ? or there is checkbox on user table which says Manager like that ?

Please hit like and mark my response as correct if that helps
Regards,
Musab