Planned Start Date Validation

ktjstn
Kilo Expert

I want to make a Planned Start Date Validation wherein a pop-up message will appear if the selected Planned Start Date is more than 7 days to the current date.

 

Thanks!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kate,

So the planned start date should not be more than 7 days from now

You can use UI policy on change request table for this with condition as below:

find_real_file.png

 

find_real_file.pngscript: for execute if true

alert("Please select planned start date within 7 days from now");
g_form.clearValue('planned_start_date'); // use proper field name here

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

10 REPLIES 10

Mark Roethof
Tera Patron
Tera Patron

Hi there,

There are several examples on the community thru for example GlideAjax to achieve this.

Though, you might achieve this also thru the Condition Builder of (Catalog) UI Policies (tested on New York):

find_real_file.png

OOnly part you have to script, is within the Script field something with displaying an error message, maybe emptying the date field, and that's it.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

It's not working.

Thank you!

How about if Planned End Date > Planned Start Date?