DEV Community

Thom
Thom

Posted on

ServiceNow: Wait for Condition Flow Designer

The 'Wait for Condition' action in the ServiceNow FlowDesigner is run once and returns an EncodedQuery. Every time the record is updated, the record gets evaluated with the EncodedQuery and if it matches, the flow will continue.

That in mind, it is possible to write your own EncodedQuery in the inline script editor of the condition builder.

For example you can check if an 'on hold due date' was changed like:


return 'u_on_hold_due_date!=' + fd_data_trigger.current.u_on_hold_due_date.getValue();

Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
insight_it_891bf8cd689700 profile image
Insight IT

Nice blog and informative content,
Thanks for sharing with us,
We are providing Best SERVICENOW Training in Hyderabad,

SERVICENOW Online Training in Hyderabad
SERVICENOW Training in Hyderabad
SERVICENOW Course in Hyderabad

Collapse
 
kamal_deeppareek_f5bb5d8 profile image
Kamal Deep Pareek

The 'Wait for Condition' action in ServiceNow Flow Designer is powerful for automating workflows. Using the inline script editor to craft custom EncodedQueries, like checking changes in the 'on hold due date,' provides flexibility. This feature ensures precise record evaluation, streamlining flow continuation based on dynamic conditions.