The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Compare date fields.

Taaha M
Tera Contributor

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.

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Taaha M 

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

AnkurBawiskar_0-1758200231603.png

AnkurBawiskar_1-1758200253415.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

This will not work for two different tables

@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.

@Taaha M 

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?

GlideAjax Example Cheat Sheet 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader