How to create a script where condition is based on time difference in minutes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 10:17 AM
I have two fields A and B of date time format in my catalog items. I need to implement 2 criteria-
1. Entry in field A has to be at least 15 minutes ahead of current time.
2. Entry in field B has to be at least 30 minutes ahead of entry in B.
I am thinking of using a UI policy each to implement these 2 conditions and would appreciate help in the script for them.
Thanks!
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 10:26 AM - edited 11-20-2023 10:27 AM
Hi,
You can create the UI policy as below
Field A relative After 15 minutes from now.
And Script execute if false
Clear Value of Field A with a message.
Thanks and Regards,
Saurabh Gupta