How to include a schedule in a workflow "Wait if condition" script

SC10
Kilo Guru

I'd like to include one of my custom schedules into a "Wait if condition" script. The wiki is very vague on how to include in checks to a custom schedule, so I thought I'd share my simple script and see if anyone had opinions on the best way to include a schedule check.

My end-goal is to have my "Wait if condition" result in true when the current date equals my variable's day, but also within the constraints of my schedule (so instead of at the stroke of midnight on the "same" day, the Wait If only continues to the next workflow activity within my scheduled hours:

var endDate = current.variables.offboard_effectivedate;

var currentDate = gs.now();

if (endDate == currentDate){

  answer = true;

}

else

  {

  answer = false;

}

26 REPLIES 26

I manually made an update to my RITM record for this workflow, and the "Wait For" activity did not re-evaluate. Suggestions?


pavank
Kilo Contributor

Shane,


As the record is tied to old version of workflow it would not work. Try it on a new record.