How to compare date/time field with Duration field using flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
I am sending push notifications through Flow Designer on the wm_task record. The notification currently triggers correctly when I use a relative duration in the wait condition to send it 30 minutes before the estimated_end date. However, the business requirement is to trigger the notification based on the actual work start time (work_start), which is a date/time field, and calculate the trigger time using the estimated_work_duration field so that the notification is sent 30 minutes before the estimated work duration.
Is there anyway to compare work start date/time field with duration field and trigger notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
49m ago
No, you can’t directly compare a date/time field with a duration field in a wait condition or if condition oob because the wait actions only let you use relative durations from a date/time, and there isn’t a built in logic as such in flow designer that automatically adds a duration field to a date/time field for comparison....... so the usual approach is to compute the target trigger datetime first (work_start + estimated_work_duration - 30 min) and store it in a date/time flow variable (using a script step or a custom action) and then use a wait until that computed date/time or an if condition on that datetime......because flow designer wait for duration and wait for condition actions don’t currently support comparing a duration field directly against a date/time without first converting the duration into a concrete date/time value.......
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Technical Consultant - Rising Star/Class of Legends 2025