
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 10:35 AM
I have a select box which looks at the categories on a table. I am setting a default value in that variable.
I have a second select box that is the sub-categories to the category in the first variable. I want to limit the subcategories based on the category value.
In both variables I am using the choice table and the choice field. How do I get only the subcategories related to my category to show up?
Thanks,
Stacy
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 02:58 PM
I figured it out.
Since I was setting a default for the category any way, and I only want subcategory associated to that category I did the following:
- Change type to 'lookup select box'
- Change table to the sys_choice table
- Set a reference qualifier with my dependent value (category)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 10:38 AM
Hi Stacy,
you would require onchange client script on category and accordingly add/remove options from sub-category
you cannot have dependent variable similar to fields on table
if they both refer same table for bringing the choice values; and if there is mapping between those then it can be done using reference qualifier
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 02:58 PM
I figured it out.
Since I was setting a default for the category any way, and I only want subcategory associated to that category I did the following:
- Change type to 'lookup select box'
- Change table to the sys_choice table
- Set a reference qualifier with my dependent value (category)