- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 06:15 AM
Hi,
I have created a field of type 'glide_list' as users want to select multiple values in it and have added choices to this field. However, I am unable to add or remove options on this field based on other field value.
Any suggestions would be greatly appreciated.
Regards,
Sunil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 08:26 PM
Hey Sunil,
I did some testing on my own and I was able to get this to work (in contrast to my previous reply). This is a little experimental (and guesswork), so your millage may very. Try this in your onChange client script:
g_form.removeOption('choice.incident.<variable_name>', '<choice_value>');
Replace <variable_name> with the Column Name of your variable, and <choice_value> with your choice Value. If you are on a different table, try replacing incident with your table name (or inspect the HTML to see what is listed for that element).
Basically I inspected the HTML element for the Glide List field and saw that choice.incident was a prefix of the field name. Running g_form.RemoveOption() in my browser console successfully removed the option. See attached for examples.
Remember that you will need to use g_form.addOption() to re-add any options you removed client-side if needed.
Hope this helps! Let me know if you need an example of a client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Zach N, thanks for the wonderful solution at normal record form. Do you know any solution the same for Service Portal ? It looks like it doesn't work the same like that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 09:49 AM
Hi Sunil,
You can use the Dependent field method. (see Attached Picture)
In the Dictionary Entry for the field you want to filter the choices:
- Make sure you are in "Advanced" View
- List Field type is selected
- Label and Name of the Field you want filter the choices
- Go to "Dependent Field" tab
- Check the "Use Dependent Field" Check box
- Select the field you want to use as your filter value.
- Save Form
- Go to Choices Tab
- In the Dependent Value Column, put the Value from the other field that you want each choice to filtered by.
Notes:
- No Reference Qualifier is needed with this method.
- I have yet to make it work with another glide list field, but I am still trying with Ref Qual and script includes or Client Scripts.
I hope this helps!!
Stephen