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.

How to add more dependent values to one choice field?

brahmateja
Kilo Contributor

How to add more dependent values to one choice field?

6 REPLIES 6

Can you send any sample script Thanks.

Hi,

Please find the below script.

Type : OnChange of Category

var cat = g_form.getValue('category');

if(cat == "option1")

{

g_form.setValue('subcategory',"xyz");

}

if(cat == "option2")

{

g_form.setValue('subcategory',"abc");

}

Please make it as correct if it helps yout.