Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to set Timer in workflow

chanikya
Kilo Sage

Hi 

i have request like this,

if 1st - approval didn't approved with in 1-day , then goto setValue "Cancelled"--End

if approved with in 1-day , goto 2nd- approval , if 2nd approval didn't approved with in 1-day, then goto setValue  "Cancelled"--End.

if TWO approvals approved with in 1-day then goto Setvalue-" complete"---END.

 

So how should i use timer here...???

 

The Workflow is on Custom Table

find_real_file.png

20 REPLIES 20

Not working If - Condition

 

find_real_file.png

 

 

answer = ifScript();

function ifScript(){
var app=new GlideRecord('sysapproval_approver');
app.addQuery('sysapproval', current.sys_id);
app.addQuery('state','requested');
app.orderByDesc('sys_created_on');
app.query();
if(app.next())
{
return 'yes';
}else
{
return 'no';
}

}

 

find_real_file.png