The CreatorCon Call for Content is officially open! Get started here.

Need to restrict Date field

Surya_Prakash
Tera Contributor

Hi All,

 

I have a requirement to restrict a date field to be not more than 2years from another date field. Example, If the field Date_A is '25-05-2023' then we should restrict to select only up to '24-05-2025' in Date_B field. Can you please help to achieve this.

 

TIA,

Surya. P

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @Surya_Prakash ,

 Please use Catalog UI Policy which needs no/Less coding:

https://www.servicenow.com/community/developer-articles/no-code-date-validations-through-catalog-ui-...

Just adjust the date to be "@ years" for your requirement.

 

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Awesome 😊 

Glad to see i could help you