- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 06:00 AM
Hello,
I was hoping someone can help me with a script for an if condition on a Service Catalog workflow.
There is a field on the form 'end_date', which is autopopulated based on a Change Request Number selected. (references the change_request table in SNOW).
Within the workflow, i need to write an if condtion in the workflow where it checks end_date value, compare it to the current date and time. If the end_date is in the past, return as Yes else if end_date has not passed the current date, then return No.
Thank you in advance!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 06:32 AM
You should be able to do this easily using OOTB GlideDateTime method of compareTo(). Here is the link to the docs, as well as some screenshots of the relevant info.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 06:32 AM
You should be able to do this easily using OOTB GlideDateTime method of compareTo(). Here is the link to the docs, as well as some screenshots of the relevant info.