to hide/remove some of the categories and some of the subcategories

Rahul Raja Sami
Tera Guru

Hi 
I am trying to hide/remove some of the categories and some of the subcategories from the Report an Issue RP on Service Portal view.
I have used on load catalog client script to hide some categories as follows and it worked

 

 g_form.removeOption('category', 'Linux', 'Linux');
	 g_form.removeOption('category', 'Oracle', 'Oracle');
	 g_form.removeOption('category', 'Schedule Tasks', 'Schedule Tasks');
	 g_form.removeOption('category', 'Solaris', 'Solaris');
	 g_form.removeOption('category', 'vmware', 'vmware');
	 g_form.removeOption('category', 'User Email', 'User Email');

 

 similarly I have tried both on load and on change to hide/remove some categories under Network Catalog but not working ( I know it is due to dependent value but how to overcome it)

 

 var category = g_form.getValue('category');
   
   if (category == 'network'){
		 g_form.removeOption('subcategory', 'WAN', 'WAN');
		 g_form.removeOption('subcategory', 'LAN', 'LAN');
		 g_form.removeOption('subcategory', 'IP Address', 'IP Address');
	}

 

 

Thanks in advance.

1 ACCEPTED SOLUTION

Hi Amit,

Created a script include with the filter of choices we need and added this to Subcategory Reference Qualifier.
Now its working.

View solution in original post

5 REPLIES 5

Hi Amit,

Created a script include with the filter of choices we need and added this to Subcategory Reference Qualifier.
Now its working.