Flow Designer - Issues Triggering Flow when a Data Time Field is TODAY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 01:23 AM
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:
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':
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();'
WAIT SPECIFIC TIME: Wait 24 hours and works.
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();]
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'
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:
Any help would be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 01:46 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 05:22 AM
@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'.
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:
I can see from the Configuration Details of the Flow shows the Type as "String".
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)
Do I need to configure the "Transformation Function" on one or other or both sides, and how should it be configured:
These are the fields used in the "IF Statement":