How to hide variable from catalog view when the variable is a select box item and not a independent variable

Treva1
Kilo Contributor

Hey - How would this solution be different if the variable was not independent.

 

example. -

I use u_category value name for category (variable) and use a select box to add other variables

I use u_topic as value name (variable) for topics that will populate under a category. it too, has a select box with a list of variables

Problem is under UI policy is it ask for variable name and the name is U_category or u_topic so I dont have ability to capture any of the select box variables that are listed under the select box for the u category or u topic variable.

There is also script running that populates topics based on categories. not sure if this is stopping the ui policy from doing what I'm asking. 

My goal is to be able to hide one of the categories (other) from catalog item view, but still show the select box variable it be accessible on back-end (agent view) in the case (task view).

See attachments

1 ACCEPTED SOLUTION

Yes

if you write tge same script in onchange client script instead of ui policy it will work

Incase if it still des not work let me know.

If it does please mark answer correct/helpful based on impact

View solution in original post

12 REPLIES 12

Saurav11
Kilo Patron
Kilo Patron

Hello,

You can write a on change catalog client script with the below syntax:-

g_form.removeOption('fieldname',,'fieldoption');

Please mark answer correct/helpful based on Impact.

Treva1
Kilo Contributor

So do I replace the field name with checkbox variable or catalog variable?

If you hide one of the option of u_category  from catalog item view, just use onload client script

g_form.removeOption('u_category',,'fieldoption');// replace fieldoption with the optionvalue which you want to hide.

Thanks.

Please mark answer correct/helpful based on Impact.

 

Treva1
Kilo Contributor

This partially works - it removes the category "other" from catalog view, but I dont want to remove "other" category from the list. I only wanted to remove 3 of the "other" topic options under that category from being able to be selected.

 

When I use the above formula it removes "other" category completely from catalog view. It needs to stay. I need to hide the 3 topic items only. see attached.