Dependent drop downs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
We have a requirement in a catalog item to implement dependent dropdowns. There are three lookup select boxes — SB1, SB2, and SB3 — each containing multiple dropdown values.
What is the best practice for configuring dependent dropdowns in ServiceNow?
Our Current Approach
We have added all dropdown options into the sys_choice table as below:
Table: sys_choice
Element: SB1
Value: abcd
Questions
Is it okay to use sys_choice and set the Table field to "sys_choice" within the sys_choice table itself? if not where should we put the choices if the number of choices are less than 30.
Should we be using a different table instead?
OR
Would it be better to create a custom table to store all lookup values and then configure the dependent dropdowns using reference fields and reference qualifiers?
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
that's what I am referring.
sys_choice is always tagged to a table field.
In your case it's a catalog item, so better to use Select box variable and add choices and handle the script part
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
so are you saying that if I had attached data, I should do this in script via addoption and remove option? and in future if this list grows do we continue to add remove options via script?
How could this be easily maintained?
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @JohnnySnow
We had same requirement where we have to populate three fields such as Category -> Subcategory->item
I was able to achieve this using maintain item catalog variables itself, I created the variables in sys_choice table itself and fetched them from variable by giving it type as "Lookup Select Box" and in "Type Selection" related section had the below configurations
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Akshay Kamble (SD_Akshay)
ServiceNow Developer
LinkedIn: https://www.linkedin.com/in/akshay-kamble-1504/
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@SD_Akshay that was the plan but can you tell me what did you put in the 'table' field of the sys_choice table for these dropdown values?
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Have you tried it ? You can use choice table which will be there under variable or any unused table from sys_choice which is not that useful (not recommended). I'm not recalling what I had used but the method worked for me.
Do let me know what you did
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Akshay Kamble (SD_Akshay)
ServiceNow Developer
LinkedIn: https://www.linkedin.com/in/akshay-kamble-1504/
****************************************************************************************************************
