
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 06:37 AM
Hello,
I have been tasked with hiding an option in a multiple choice list. I found there was not an "Active" button to work with, so I started writing a catalog client script to do this. However, I am having difficulty getting this script to work.
For purposes of an example (and because I was going insane trying to get it to work on Friday), I went ahead and created a new catalog with a variable called "Choice Testing," a multiple choice list with options "Red", "Green", and "Blue"
Next, I created a catalog client script in order to remove the "Red" variable. According to this post, it is wise when using an "onLoad" client script to verify that the option is not selected by default in your script which is why the "If" statement exists.
Alas, after the script our friend "Red" still loads on the form.
I tried implementing the function "Disable Option" into my System UI -> UI Scripts in accordance with the post I referenced earlier. Unfortunately, this did not also work to hide the variable.
Can I get some pointers on how to make this work? Hopefully it is just some silly mistake on my part. Any help is appreciated!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 07:06 AM
I believe removeOption() doesn't work for removing options from Multiple Choice type of variable. You can use it in Select Box type of variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 06:45 AM
Your Script is correct, Select the UI Type to 'All' and it will work as expected. 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 06:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 07:06 AM
I believe removeOption() doesn't work for removing options from Multiple Choice type of variable. You can use it in Select Box type of variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 07:12 AM
Ahh well the exact same script did work on a Select Box!
Unfortunately, the requirements of this require it to be a multiple choice list 😞
Do you know of an alternate method then maybe?