how to hide/show fields based on date variable value changes in service catalog form

Naresh_5120
Tera Contributor

Hi Community, I have build the service catalog form, which as has 3 checkbox variables mentioned below

 

1. Legal Transfer

2. Location Transfer

3. Department transfer

 

Based on selection of these, it shows the questions below

 

Example if Legal transfer is selected it shows question like 

 

Q1 -Transfer effective date

Q2 - New manager

Q3 - Previous manager

 

I created ui policy if transfer date value is at today or before , it should hide the new manager field and show only preivous mananger , otherwise it should should new manager fields, 

 

However this is not working , when date value is before today, it shows previous manager field but does not hide the new manager fields, can someone help to to achieve this through catalog client script 

1 ACCEPTED SOLUTION

@Naresh_5120 

Hope you are doing good.

Did my reply answer your question?

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

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@Naresh_5120 

share how your UI policy is configured, some screenshots

Did you ensure "Reverse if false" is checked or not? please check that checkbox so that the reverse also happens

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

Hi Ankur,

 

Thank you for quick response, Yes i have checked the reverse if false 

 

Naresh_5120_1-1745306627129.png

 

 

@Naresh_5120 

ensure Visible=False here so that it hides New Manager variable whenever condition is true

AnkurBawiskar_0-1745308841557.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

Hi Ankur,

 

I have tried that visible=false but with that i am facing problem of this particular filed is visible on the form without selection of checkbox variable

 

I have 3 type of transfer option as checkbox variables, intitally when form load, all variables (fields) are hidden, based on variable checkbox selection limited fields shows on the form. 

 

Naresh_5120_0-1745403599765.png