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.

Add options based on choices

latha13
Tera Contributor

Hi,

In a catalog item i have Multiple Choice field  (New and old choices in multiple choice field)

In that catalog item i have multi row variable set(Accessing) in that there is a field access(Multiple choice field) and choices are Grade1 and Grade2..Now Req is :

Under New -> Accessing(multirow variable set)-> access : Should only have Grade1

Under Old-> Accessing(multirow variable set)-> access  : Should have both Grade1& Grade2( As it is) Mandatory

I tried with on change client script :

g_form.clearOptions('access');

if(newValue=='New')
{
g_form.addOption('access','Grade1 ');
g_form.removeOption('access','Grade2');
}
else if(newValue=='Old')
{
g_form.addOption('access','Grade1 ');
g_form.addOption('access','Grade2');

}

 

6 REPLIES 6

Hi,

I just wanted to check-in on this.

If my reply above helped guide you correctly, please mark it as Helpful & Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Priyanka Vasant
Tera Guru

Hi Latha,

Find the below link that might help you.

https://community.servicenow.com/community?id=community_question&sys_id=a89e3665db58dbc01dcaf3231f96...

Mark helpful or correct based on impact.

 

Regards,

Priyanka A.