Configuring Dropdown options for a catalog item variable

phr
Tera Contributor

Hi All,

 

I have a requirement where i need to hide 1 option from the variable dropdown options and it is (inactive=true) in the instance, when i try it within the instance it is working fine. But the catalog item when opened from portal is still showing up the inactive option. 

How to achieve this?

1 ACCEPTED SOLUTION

dgarad
Giga Sage

Hi @phr 

create onLoad client script

The standard way is to clear all options and add only those required based on conditions.

To clear all options use 

g_form.clearOptions('<<fieldName>>');

 

To add Options use

g_form.addOption('<<fieldName>>'     ,      '<<value>>'     ,     '<<label>>'    ,    '<<sequenceNumber>>');

 

If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad

View solution in original post

3 REPLIES 3

dgarad
Giga Sage

Hi @phr 

create onLoad client script

The standard way is to clear all options and add only those required based on conditions.

To clear all options use 

g_form.clearOptions('<<fieldName>>');

 

To add Options use

g_form.addOption('<<fieldName>>'     ,      '<<value>>'     ,     '<<label>>'    ,    '<<sequenceNumber>>');

 

If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad

phr
Tera Contributor

Hi @dgarad ,

 

This worked. Thank you.

Hi @phr 

Please mark it as correct and helpful.

If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad