Hide question choice on catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2018 01:45 PM
So, I have a catalog item where I used a Select Box for a variable, and set a bunch of Question Choices.
Fast forward 2 years, and one of the choices needs to no longer be on there. But... there is no way to inactivate the choice.
How would you make it no longer be a choice on the request form, but still exist on old requests, in reports, etc.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2018 01:58 PM
You should be able to write a Catalog Client Script that runs only on the Catalog Item Form that hides the choice.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2018 03:22 PM
You can write an onLoad client script:
function onLoad() {
g_form.removeOption('field name', 'option'); //replace field name and option with your own
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 12:41 AM
Thanks, Moy!
I found that your onLoad Catalog Client Script does not work on Multiple Choice variables but it does on Select Box variables for some reason.
Best regards
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2019 01:25 AM
I have a similar question except that if the requested item (created from the catalog) is not approved yet, I would be able to amend the field and the field should hide the choice.
The script works on the catalog item but it is not working in the requested item view even though "Applies on Requested Item" is already checked. Any clue? I tried to create a new OnLoad client script at the requested item level but it is not working as expected.