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 hide questions based on specific selections

reza1921
Tera Contributor

Hi all,

 

I am creating a catalog item that has a select box with some choices (questions). For example lucky_hs and hifi_gs.

There is another select box right after the one above with specific choices (questions). I am trying to show certain questions in the second select box based off the selection in the first one? Is that possible? I cant seem to add a UI policy action to the variable questions, just the variable itself.

 

Thanks

5 REPLIES 5

vishakhayadav24
Tera Guru

Hi @reza1921 

Write a on change catalog client script and check the newValue, put if else condition according to your requirement and pass the below code 

g_form.clearOptions('variable_name'); 

g_form.addOption('variable_name', '1','1');