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 06:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 06:38 AM
Hi Harish,
Great answer if it's a choice list on a field, but unfortunately this one is related to a catalog variable.
I want to disable one of the values in the "Question Choices" from a Multiple Choice variable on a catalog item
There is no such active/inactive options on catalog variables. I'm as stunned as anyone on this. My only suggestion, which is an ugly one is to add a field (u_active) and then use an onLoad client script to adjust the choice list accordingly using g_form.removeOption(). Your client script would need to do a GlideAjax call to check valid options. A bit of a hack, but it could work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 07:30 AM
Thanks Chuck.
Can you provide a little more details on your workaround? I'm not a coder so you lost me at GlideAjax.
I think what you're saying is that I would need to create a new "active" or possibly "inactive" column to the question_choice table. Then create the onLoad client script on the catalog item to adjust the choice list. Does g_form.removeOption() work on multiple choice question choices? Can you share details of what the GlideAjax would look like?
Thanks,
Johnny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2017 06:47 AM
Thanks.
Yes, unfortunately the question choices are on a different table and I confirmed that the question_choice table does not have an "active" field.