'glide_list' field because users want to select numerous values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:49 PM
Hi,
I added choices to a 'glide_list' field because users want to select numerous values. However, I cannot add or remove field options based on other field values.
Any suggestions are welcome.
- Labels:
-
Audit Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:54 PM
Hi @jsjsnaN ,
To dynamically filter the selectable values based on another field, do this:
🛠 Option 1: Reference Qualifier (Dynamic)
Ensure your glide_list is a reference to a table (e.g., User or Group).
Set a reference qualifier to dynamically filter based on another field:
Use a dynamic reference qualifier or a scripted one.
Example (in field dictionary → advanced view → Reference qualifier):
javascriptjavascript:answer = current.related_field == 'xyz' ? 'active=true' : 'department=IT';
🛠 Option 2: Client Script (Form-specific logic)
Trigger: onChange of the field that drives the filter logic
Target field: your glide_list
⚠️ Important Notes:
If you're trying to allow multiple static values, glide_list may not be the best field type — consider using:
A multi-choice field with a choice list
A multi-row variable set (if you're in a catalog item context)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:57 PM
1. Use Reference Qualifiers
If your glide_list is referencing another table (like User, Group, etc.), set a Reference Qualifier to filter options based on another field.
How:
Go to the field in the dictionary (sys_dictionary).
Set a Dynamic Reference Qualifier or write a script-based qualifier.
Example script qualifier:
So if you have a Location field, this filters glide_list items to only those matching the same location.
2. Use g_form.setValue() and g_form.setReadOnly() Client Scripts Carefully
Sometimes users try to pre-filter the values on the client side. While g_form.getValue() works fine, note:
g_form.setOptions() doesn’t work on glide_list.
Instead, pre-fill the list using g_form.setValue() if you already know valid values.
I prefer the first one though.