Flow Designer - Issues Triggering Flow when a Data Time Field is TODAY

Damian Mudge
Tera Expert

I have created a new flow in 'Flow Designer' to automate a 'Chase Reminder' to the Customer when a new date and time field is the same as the System Date / Time.

 

The logic of the Workflow is as follows:

1. Triggers when a ticket is 'State' is "On hold" and the On hold reason is "Awaiting Integrated Customer".

2. Waits for until the date in the "On hold until" to be the same as TODAY

3. Waits 24hours

4. Looks up 'Trigger Record' and performs evaluation against defined conditions

5. Performs update actions defined in 'IF' or 'ELSE'. 

 

On every occasions the Workflow is reporting that the 'IF' criteria is not met ("evaluation is false") and bypasses the 'IF' action and completes to the 'ELSE' action. 

 

WORKFLOW EXECUTION:

DamianMudge_0-1724049992839.png

 

TRIGGER: The trigger logic is as follows and works as expected.

When the 'State' IS "On hold", AND 'On hold reason' IS "Awaiting integrated Customer" AND 'On hold until' IS 'true' OR CHANGES TO 'true' AND 'Date chase sent' IS 'null': 

DamianMudge_1-1724050408370.png

WAIT FOR CONDITION: The workflow then waits until the "On hold until" date is ON the System Date using a Flow variable and works as expected.

When "On hold until" ON 'Flowvariable = var gdt = new GlideDateTime(); return gdt.getValue();'

DamianMudge_2-1724050686253.png

 

WAIT SPECIFIC TIME: Wait 24 hours and works.

DamianMudge_3-1724051009398.png

 

LOOKUP Record and 'IF' / 'ELSE' :

The Trigger record is checked to see it still meets the criteria, then updates with either the 'IF' or 'ELSE' actions. This is where the evaluation against the 'IF' Conditions statement and where it reports that the 'Evaluation is False' bypasses the IF action and completes the 'ELSE' action and fails the evaluation check which is should be passing.

 

IF CONDITIONS:

IF the 'State' IS "On hold",

AND 'On hold reason' IS "Awaiting integrated Customer"

AND 'Chase count' IS "0"

AND 'On hold until populated flag' IS 'true'

AND 'On hold date' IS at or 'at or before' the 'System Date' [Scripted Flow variable: = var gdt = new GlideDateTime(); return gdt.getValue();]

DamianMudge_4-1724051115857.png

ELSE

Update Trigger Record 'Worknotes' AND revert 'State' to "In progress". and and works as expected.

 

'Conditions 1, 2, 3 & 4' are always met, so I believe the problem lays with Condition 5 and most likely flow variable, which is the same one that appears to work the initial 'WAIT FOR CONDITIONS

DamianMudge_5-1724052484417.png

There are no 'Transform functions' defined in 'Condition 5' and the flow variable is the same as used in the 'WAIT FOR CONDITION' and defined as: 

var gdt = new GlideDateTime();
return gdt.getValue();

 

Any help would be much appreciated.

2 REPLIES 2

Mark Manders
Mega Patron

What do your flow executions say about the fields and variables (their values)?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Damian Mudge
Tera Expert

@Mark Manders The Flow Executions Say "Evaluated - False". I know that the Conditions 1-4 are still being met at this point. So it is Condition 5 that is the issue.

 

Looking at the screenshot below I can see that Flow successfully triggers, waits until the relevant date and waits 24hors before it looks-up the trigger record. All complete. Then when evaluates it against the 'IF Statement' itfinds it to be 'false'. 

 

DamianMudge_1-1724068623555.png

 

Condition 5 was built using the Data Picker and is:

"Trigger - Record Updated > Trigger Record > On hold until" at or before "Flow variables > GetTimeNow" 

And supposed to mean

"On hold date" at or before "timenow"

 

GetTimeNow Flow variable contains the following script:

var gdt = new GlideDateTime();
return gdt.getValue();

 

I can see from the Configuration Details of the Flow shows the Type as "String".

DamianMudge_2-1724069271043.png

 

However, the Flow currently does not any "Transform Functions" configured on either the "Trigger Record" or the "Flow Variables" side (Highlighted below on the Trigger Record side)  

DamianMudge_3-1724069477144.png

 

Do I need to configure the "Transformation Function" on one or other or both sides, and how should it be configured:

DamianMudge_4-1724069744970.png

These are the fields used in the "IF Statement":

DamianMudge_5-1724069876315.png