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

How to make fields read only when future date is selected in a Date field

varunkumar1
Tera Contributor

Hi,

I have 3 fields on a form as below

Date field and 2 string fields.

When Date selected is tomorrow's date, then other two string fields should be made as read only.

Please let me know how can this be done.

1 ACCEPTED SOLUTION

arron_ubhi
ServiceNow Employee
ServiceNow Employee

Hi Varun,



You can achieve this by using a Client Script, or possibly a UI policy to control this.



You can set a UI policy for the following, for example with the following conditions in the condition builder:



"Datefield1" "after" "current minute"




Best Regardds,



Arron


View solution in original post

7 REPLIES 7

arron_ubhi
ServiceNow Employee
ServiceNow Employee

Hi Varun,



You can achieve this by using a Client Script, or possibly a UI policy to control this.



You can set a UI policy for the following, for example with the following conditions in the condition builder:



"Datefield1" "after" "current minute"




Best Regardds,



Arron


HI Arron,



I have used UI policy with Condition as "date_field" "after" "Today". I got it thanks for the help.


Hi Varun,



Thanks for the update, glad you got the issue resolved



Please mark it as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.


If you are viewing this discussion from your "inbox", use the "mark as correct" option under actions. If you are viewing it directly from the thread use the Correct Answer link (red with a star).



Best Regards,



Arron