date variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 05:00 AM
Hi All,
I have a date variable 'xyz' which value is getting auto populated based on other 2 variable's values but still not read only. When the value of the date variable 'xyz' is not empty then I need to restrict the user to select any date which is greater than the current value of that date variable xyz that means user can select any date till the date which is already getting auto populating but not greater than that.
I want to do it using on change client script.
Can you please help me out.
Thanks in advance.
Regards,
Abhisek Chattaraj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 12:29 AM
I already informed without hidden variable it's not possible
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 12:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 12:39 AM
Glad to know.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 03:40 AM - edited 01-07-2025 05:11 AM
I had implemented this with hidden variable as you suggested but issue is when variable xyz is getting auto populated with the greater date than the previous auto populated date value then also it is throwing the error message.
But using on submit catalog client script it is working.
Regards,
Abhisek Chattaraj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 06:25 AM
Step1: Create a hidden variable with name as 'date1' and store the auto populated date in that variable.
Step 2: Use the following On Change script for the variable which user can change:
Regards
Mounika