hide subcategory option Client script

ST9
Tera Contributor

Hi All

 

I have a requirement that if the Assignment group is "ABC" and category is 'abc' then it should hide few of the subcategories dependent on category.

I have written onChange  of assignment group and category Client script, only assignment group CS is working not the category. Category Client script is working for a few sec but again it is showing all the dependent subcategories.

 

 

9 REPLIES 9

ST9
Tera Contributor

I am just giving the example which you can test in your instance for Incident table.

ST9_0-1696335338144.png

The code will execute for a sec and clear of the value in subcategory. But after few sec, the subcategory choices will be populated with all dependent values 

There are three equals to for category

ServiceNow Use6
Tera Guru

UI Type change to All

no, not working

Anubhav24
Mega Sage
Mega Sage

Hi @ST9 ,

You can go to subcategory choices and under Dependent value of 'inquiry'<value of category drop down> you can mark the inactive as true and then those values will be hidden. 

Anubhav24_0-1696407894143.png

Post this you can implement your logic of adding options in the choice list

 

Please mark helpful / correct if my answer helped you.