The CreatorCon Call for Content is officially open! Get started here.

Catalog Client Script - g_form.removeOption / g_form.removeOption is not working

Miko_aj Buczek
Tera Contributor

Hello,

 

I have a task to add/remove choices from sub_unit_1 variable based on choices from business_unit_1 variable. 

Business_unit_1 is a reference to table "u_business_unit", label '"name", and sub_unit_1 is lookup selectbox ( also reference to table "u_business_unit", label "name")

Code below is not working. Please, assist. Thanks

 

Miko_ajBuczek_0-1668766814389.png

 

1 ACCEPTED SOLUTION

You should provide below parameters while using addOption method :

 

g_form.addOption("sub_unit1", "All employee", "All employee", 1);

g_form.addOption("sub_unit1", "ATF Test", "ATF Test", 2);

 

Please mark answer as Correct or Helpful based on impact.

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

View solution in original post

5 REPLIES 5

Thank you, its working.

Regards