Wait for a date to start tasks using flow designer.

H_ctor Blanco
Kilo Guru

HI all,

I have added a date/time variable to the form of a catalog item to specify when the tasks should be created.

I´m trying to implement it using the flow designer but I don´t know how to check the date to start the tasks. When the date is achieved, the tasks should be created, but not before that.

Is that possible?

I have tried this but doesn´t work:

1-Check if is the affected catalog item.

2-Set the requested item active=false.

3-Wait for date (i don´t know how to implement it).

4-Set the requested item active=true.

4 REPLIES 4

Tudor
Tera Guru

Hello Hector,

The tasks to which you are referring to are "sc_task"?

If so, within you flow you can add a wait for condition activity where you set as a condition:

your_field is on Today

Hope this helps!

 Tudor

Hi Tudor,

The tasks are asigned to a requested item and are stored in the sc_task table. 

My problem now is how can I check if I reached the date. I don´t know how to configure the wait for condition. Tasks must be inactive until the date is reached.

asifnoor
Kilo Patron

Hi,

Here are the steps to follow.

  • Create a flow on ritm table
  • Go to your catalog item and configure flow in it
  • Then in the flow, add a ctivity wait for duration, . Refer to below link on how to do it.

https://docs.servicenow.com/de-DE/bundle/quebec-servicenow-platform/page/administer/flow-designer/co...

Mark the comment as a correct answer and helpful if this has helped to solve the problem.

Surendra9
Tera Contributor

Hi Hector

Please use below 2 steps.
1.First you have to use Get catalog Variables in the flow designer and select all the variables

Surendra9_0-1667892370930.png

 

2.Use Wait for the Condition in Flow Designer with relative duration, now you will have the option to select input Date,Time variable using the data picker.
Here below, the flow will trigger after 1 minute of the date in the variable

Surendra9_1-1667892428243.png



Please mark this as Helpful if this is useful

Hope this helps!
Surendra