How to skip(by pass) to send the approval to VIP user?

jugantanayak
Tera Guru

How to skip(by pass) to send the approval to VIP user?

 

IF script is not working.

var title = current.variables.requested_for.vip;

answer = ifScript();
function ifScript() {
if (title == true)
return 'yes';
else
return 'no';
}

1 ACCEPTED SOLUTION

dmathur09
Kilo Sage
Kilo Sage

Hi,

Can you put true in inverted comma,

var title = current.variables.requested_for.vip;

answer = ifScript();
function ifScript() {
if (title == 'true')
return 'yes';
else
return 'no';
}

Regards,

Deepankar Mathur

View solution in original post

8 REPLIES 8

Aman Kumar S
Kilo Patron

Hey,

Do you want to remove VIP approval altogether? then you can just remove activity and connect the previous activities with latter ones

OR

If you want to skip for certain conditions, add a if activity in the workflow before your VIP approval activity and configure your condition there

Best Regards
Aman Kumar

Hi Aman,

Thanks for your reply.

I have a requirement, if the approver is VIP then approval should be skipped to next activity.

And if the approver is non VIP then approval should send to requester's manger of manager(2nd level approval).

Thanks in advance.

Regards,

Juganta

Try this script:

var title = current.variables.requested_for.vip;

answer = ifScript();
function ifScript() {
if (title == "true")
return 'yes';
else
return 'no';
}
Best Regards
Aman Kumar

DrewW
Mega Sage
Mega Sage

That is going to depend on how you are doing your approval action.

Options are

 - The action has a condition field, so you could add a check for not a VIP.

 - If you are using an approvers script you can check it in there.

 - You can us an action before the approval that does what ever checking needs to be done and bypass the approval action if its a VIP.

I would say the easiest is the first two.