Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Variables in catalog are dependent to one another

suuriya
Tera Contributor

Hi,

 

I have an requirement, in catalog form there are 2 variables, variable 1 contain country details (like india usa uk....) and variable 2 contains state details. Now if i selelct india in variable 1 then only state of india need to be display in variable 2....

Note field 2 should be multi select variable.

 

As of now I have created 2 tables one for country (u_country)which has 1 column with country details and other table (u_state)which has 1 column with state details.

 

Now How can i achieve this when i select india in variable 1 then states like Tamil nadu,kerala....should be display in variable 2 and it should be multiselect

If it is possible by onchange client script pls help me with the script

 

2 REPLIES 2

jMarshal
Mega Sage

Z_K_Qazi
Tera Contributor

you Create Two variables

In 'state field' set auto populate field with 'country field'

if it works please mark.