- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 10:23 AM
Hi,
I am trying to remove/hide option from catalog client script ONCHANGE but not working any suggestions
function CallBack(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
var user = JSON.parse(answer);
if (user.division != 'eaf7c8431b88001408b8ea0dad4bcb84') {
alert('inside division if');
//g_form.setValue('selected_division', 'office');
g_form.removeOption('update_which_number', 'desk');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 10:31 AM - edited 12-14-2023 10:34 AM
Hello @sinu2 ,
I dont think that this is possible, you can use the Select Box type of variable.:
https://www.servicenow.com/community/developer-forum/remove-option-from-a-multiple-choice-variable-w...
But there are those options as well, but I think that you fastest win is Select box:
https://www.servicenow.com/community/itsm-forum/how-to-hide-an-option-from-a-multiple-choice-variabl...
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 10:31 AM - edited 12-14-2023 10:34 AM
Hello @sinu2 ,
I dont think that this is possible, you can use the Select Box type of variable.:
https://www.servicenow.com/community/developer-forum/remove-option-from-a-multiple-choice-variable-w...
But there are those options as well, but I think that you fastest win is Select box:
https://www.servicenow.com/community/itsm-forum/how-to-hide-an-option-from-a-multiple-choice-variabl...
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 10:57 AM
Now when i think bout it you can create a widget to replicate the options and add it to custom variable, but after that you are not going to see it on RITM and task, so you need to create a hidden multiple choice variable and how it only on RITM/task and you need to clear out what options you want to show there, it is not optimal but it can work.
Cheers,
Stefan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 11:07 AM
@sinu2 removeOption only works for select box variable and doesn't work for multiple choice variable.