Approval Workflow - Skip Approval if they are in a certain group

nel1408
Tera Contributor

Hi all,

 

I am new to the community so I hope i am doing this right.

 

I wanted to create a approval workflow in which the approval is only created, if a user is not in a certain group.

In this case my Group is called "DE-Managers".

So all managers can request anything without a approval, all "non-manager" user requests have to be approved.

I've created the following worklfow and copied a script, which unfortunately does not work for me.

nel1408_0-1716976535755.png

Script:

var ourUser = gs.getUser().getUserByID(current.requester);//current.requester - end user in RITM

answer = ifScript();

function ifScript()
{
if(ourUser.isMemberOf("DE-Managers"))
{
return 'yes';
}
return 'no';
}

 

Hopefully somebody can help me here 🙂

 

Best regards,

NEL

0 REPLIES 0