- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 06:57 PM
Hi SN Community,
I have a requirement in the Flow Designer to trigger an IF condition if the date on a record is "on or before the current date".
The flow designer only appears to accept a 'data pill' field as an input.
Is there a way to insert the current date as the comparison without referencing a record field?
If not, is it possible for the ServiceNow add this to the requested functionality list?
Cheers,
- Mike
Solved! Go to Solution.
- Labels:
-
flow designer
- 12,343 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 10:29 PM
Update 1.0:
I was able to work-around this by creating a custom 'action' which uses a small script to return the current date.
(function execute(inputs, outputs) {
//Output the current date (glide_date)
outputs.result = new GlideDate();
})(inputs, outputs);
The returned current date from the script can be used a 'data pill' to compare dates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 05:06 PM
Hi Joshua,
In our case it's not reevaluated within the Flow. Instead the updated field (Account Start Date) is reevaluated separately each morning by a Scheduled Job on the record itself.
The reason for the IF comparison in this Flow is to check if the account needs to be started immediately or can be checked on a later date.
If you're looking to do similar using a flow, you might be able to use something like a "do the following until" flow logic, but I wouldn't recommend having too many transient flows running if it can be done using a different method.
Cheers, Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023 02:15 PM
This is very helpful! Was wondering if you could share how you have your action configured!