How to compare previous value and current value of date field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-09-2023 02:55 AM
Hi All,
I have a requirement stating that, In my form there is date/time field. I need to write a client script on that field. Whenever i select the date before last 6 months of previous value it should throw me an error/warning like "Date cannot be before last 6 months" & for future date it should throw me an error like "Date cannot be in future". I need to validate from value in date field. For example date field has 2/4/2020, this field can update only up to past 6 months(i.e. till oct/2019) and do not update to future date.
How can we achieve this by using client scripts?
Thank you all in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-12-2023 06:13 AM
Hello @abhi710 ,
Please use condition like below:
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-10-2023 11:24 PM
Hello @abhi710 ,
Did you try the above solution?
If my response helped please mark it correct and close the thread.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-12-2023 02:33 AM