DEV Community

Thom
Thom

Posted on

4

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 (1)

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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay