- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 02:09 AM - edited 08-26-2024 02:10 AM
User has a requirement : In a catalog item, when a 'ABC' ci is selected , 'XYZ' option of request category field should be removed from option.
For this , i used the below script but its not working:
What is the error here?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 05:38 AM
@VishakhaShi You can specify the reference qualifier in the Type specification tab of your look up select box variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 03:12 AM
@VishakhaShi Please update your script as follows.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ci = g_form.getValue('configuraion_item');
if (ci == 'CI sys id')
{
g_form.removeOption('request_category', 'access_privilege');
} else {
g_form.addOption('request_category', 'access_privilege', 'Access & Privilege');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 03:17 AM - edited 08-26-2024 03:19 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 04:04 AM
@VishakhaShi Are you sure that request_category is a select box and not a Look up select box? The addOption and removeOption only work with select box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 04:08 AM
Its Look up select box actually. What is an alternate of addOption and removeOption ?