How to send approval based on RITM value?

lucky24
Tera Contributor

Hi Team,

 

I have one catalog item in which there is one select box variable with 4 choices value.

 

A- general  access 90

B - general  access 92

C - advance  access 90

D - advance  access 92

 

SO I have to send approval only when user select option C or D( advance  access 90 or advance  access 92)

I have created one notification on sysapproval_approver table but there In filter condition I am not able to dot walk on variable 

Please help me here how can I achieve which code I need to write on advance condition So I can send approval based on the variable?

10 REPLIES 10

Vishal Birajdar
Giga Sage

Hi @lucky24 

 

Assuming you are using workflow.

You can use "If" activity in workflow and Click on Advanced and write a below script :

 

var myValue = current.variables.yourvariablename;

answer = ifScript();
function ifScript() {
//use your choice values
if ( myValue == 'advance access 90' || myValue == 'advance access 92') {
return 'yes';
}
return 'no';
}

 

and depending upon If activity you can divert the flow.

 

VishalBirajdar7_0-1695638295876.png

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates