How to disable question choices in multiple choice variables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 06:01 AM
I've been searching the community and can't find the answer on Helsinki.
I want to disable one of the values in the "Question Choices" from a Multiple Choice variable on a catalog item since it is no longer a valid option. I would have thought that there would be an "Active" flag on the question choices to uncheck but that does not exist. So what are my options for disabling one of the choices without deleting the option? Deleting the option would remove the value all together, even on the RITM's that were previously submitted with this option selected. So in order to not lose history, I would rather not delete the option.
I previously used an onLoad script like this to hide question choices, but since upgrading to Helsinki from Fuji, this script is no longer working.
(I am on Helsinki Patch 9 and using the Service Portal to access my service catalog.)
Any best practices for accomplishing this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 07:40 AM
Can you try with the below functions that SNOW API provides:
g_form.clearOptions('<field_name>');
g_form.addOption('<field_name>', '<choice_name>', '<choice_label>');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 07:51 AM
Did you try this if it works?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 08:00 AM
I haven't tried this for the scenario provided by Johnny.
But these works when we use in OnLoad or onChange client script for lookup field.
Thanks,
Arindam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 08:03 AM
Did you note what is the type of the variable that this question refers about?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 09:22 AM
Thanks.. I haven't noticed that.