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

Make locations visible only when external is selected

New user1212
Tera Contributor

Hi

How to create a location field that will be displayed only when the external option is selected in the contract type field?

Newuser1212_0-1693211921698.png

 

4 REPLIES 4

Peter Bodelier
Giga Sage

Hi @New user1212 

Create a UI Policy. Condition Contract type is not external. UI Policy Action Location Visible True


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Ankur Bawiskar
Tera Patron
Tera Patron

@New user1212 

you need to have a location field and then use UI policy or onChange client script.

what did you start with and where are you stuck?

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

Sominnown
Tera Contributor

Hi @New user1212,


You can use UI policy for this.

P/s: You can not hide a mandatory field. Please make sure that you set its madatory to false before make it disapear. 😊


Hope that helps.

Pritam7
Tera Contributor

Hi,

 

Its always recommended to prefer UI policy over client scripts.
However, please create an UI policy with condition Contract type= External and 'save' it.
After that you can create one UI policy action under same UI policy for 'location' field and put Visible=true. That's it! you're good now.