- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 12:19 AM
Hi,
For Incident managing, I have 10 categories and respective subcategories.
For Catalog Items(Record Producer to "Raise an Incident") I am using same values of category and subcategory.
But for another Catalog Item(Record Producer to "Raise Security Incident") I want to show only 5 categories and respective subcategories.
I want to restrict values of categories for specific Catalog Item.
I think need to use "catalog client script" but don't know to how and what should be script.
Please help me to restrict values of categories for specific Catalog Item.
Solved! Go to Solution.
- Labels:
-
Incident Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 01:07 AM
Answer:
Use following code as per requirement:
//g_form.addOption('variable_name', 'choice value', 'choice lable');
g_form.clearOptions('category') // is important to clear available set of categories
g_form.addOption('category', 'hardware', 'Hardware'); // to add category option
g_form.removeOption('category', 'Login Issue', 'Login Issue'); // to remove category option
Thanks
-KV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 01:03 AM
Thank you for the response.
I got the solution that I can use following code for my requirement.
g_form.clearOptions('category')
g_form.addOption('category', 'hardware', 'Hardware');
g_form.removeOption('category', 'Login Issue');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 01:07 AM
Answer:
Use following code as per requirement:
//g_form.addOption('variable_name', 'choice value', 'choice lable');
g_form.clearOptions('category') // is important to clear available set of categories
g_form.addOption('category', 'hardware', 'Hardware'); // to add category option
g_form.removeOption('category', 'Login Issue', 'Login Issue'); // to remove category option
Thanks
-KV