Compare date fields.
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-18-2025 05:50 AM
I have one date field on “dmn_demand” table and other on “dmn_demand_task” table.
The field “Planned Start Date” on Demand table should not be after “Due date” on Demand Task table.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-18-2025 05:58 AM
you can do this with UI policy like this and less scripting required.
You need not worry on the date format for different users and it will be taken care automatically
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
 
09-18-2025 06:20 AM
This will not work for two different tables
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-18-2025 06:35 AM
@Taaha M , Have you tried implementing solution I have posted? Where are you stuck now?
If this solution helped you Please Mark this solution as accepted and helpful as it will be helpful for other users as well.
Best Regards.
Saurabh V.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-18-2025 06:44 AM
I thought it's same table.
then in this case you should be using onChange client script and use GlideAjax and send the date and then compare.
but what if there are more than 1 demand task?
which demand task the script will pick?
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
