Creating conditional fields on a form

stevekeiper
Kilo Contributor

Are there ways to create conditional logic or configuration where a field on a form appears/disappears based on the selected value of another field?

real world example:

Admin user editing the address of a user record.

Admin user selects Country Code = USA, a State field is then available to select a State, PA, NY, FL etc.

Admin user selects Country Code = CAN, a State field (a different one I presume) is then available to select ON, SK, YT, etc.

I want to expose a different state field, with a pick list of values based on the country code selected by the admin user when populating user info on the user form.

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

You need to configure UI policy to achieve your requirements.

Please check below for more details on UI policy.

 

https://docs.servicenow.com/bundle/helsinki-platform-administration/page/administer/form-administration/task/t_CreateAUIPolicy.html

 

REgards,

Sachin

Pranay Tiwari
Kilo Guru

Hi Stevekeiper,

You can select the data type of Country Code & State field to choice, then goto sys_choice and make state field dependent with Country code.In sys_choice you define what state you want to show after selecting country code.