How to make A variable dependent on another variable in service catalog.

Sharath goud1
Giga Contributor

How to make the following variable dependent.

When I selected Desktop then canon dt 101,canon dt 102 should be displayed ,

When i selected Floortop then canon ft 101, canon ft 102 should be displayed.find_real_file.pngfind_real_file.png

 

 

 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

since both are drop down you will have to write onChange client script on 1st and accordingly show/hide the options using g_form.removeOption() and g_form.addOption()

Removing or Disabling Choice List Options

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Sharath goud 

Not sure if the latter answer was marked correct mistakenly.

I provided the similar approach of adding/removing options.

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Sharath goud 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Murthy Ch
Giga Sage

@Sharath goud 

You can use UI policy here, where in Run scripts you use addOption and removeOption to show the options dynamically.

In the UI policy set the condition filter accordingly.

Syntax:
g_form.addOption("variable_Name",value,displayValue);

g_form.removeOption("variable_Name",value);

 

Thanks,

Murthy

Thanks,
Murthy