- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 02:56 PM
Looking for guidance on how to create a dependent drop down in a record producer.
The record producer has a department field and a division field.
The list of choices for the departments is a "Lookup Select Box" based on a table like myDept table below.
I say "like" because I couldn't figure out how to remove duplicates when setting up a Lookup Select Box on a table with replicates, so created a separate table for it with distinct values.
What I would like to do is set up another field that works like a "Lookup Select Box", or could even be a "Lookup Select Box" if that works for divisions.
Depending on what the user selects for a department, the dependent lookup should determine what divisions are shown in the dependent list.
That is, based on the table below if the user selects DeptName1, they should see in the drop down for the Division field as:
Div1a
Div1b
Div1c
Table: myDept
deptID | deptName | divID | divName |
---|---|---|---|
1 | DeptName1 | 10 | Div1a |
1 | DeptName1 | 20 | Div1b |
1 | DeptName1 | 30 | Div1c |
2 | DeptName2 | 11 | Div2a |
2 | Deptname2 | 12 | Div2b |
2 | DeptName2 | 13 | Div2c |
3 | DeptName3 | 14 | Div3a |
3 | DeptName3 | 15 | Div3b |
Here are my questions:
1) What are the steps to set up such a dependent list ?
2) Can this be done by using the table above, or splitting the divisions out into their own lookup table? (e.g. divID, divname)
Yes, the table methods is preferred because we are talking about 1200 departments and many more divisions.
3) Would a Catalog client script be an effective way of doing this? If so how?
Thank you for sharing your expertise in advance. I am a novice script-er that this point, but trying to learn fast.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 06:08 PM
HI Glenn,
You'll need to build this yourself using a catalog client script and a GlideAjax call. Take a look at episode 33 here: TechNow Episode List it will help you get a list of options set up for the second drop down list.
Docs: Client Scripts
Docs: GlideForm
Docs: GlideAjax
Client Script Best Practices - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 06:08 PM
HI Glenn,
You'll need to build this yourself using a catalog client script and a GlideAjax call. Take a look at episode 33 here: TechNow Episode List it will help you get a list of options set up for the second drop down list.
Docs: Client Scripts
Docs: GlideForm
Docs: GlideAjax
Client Script Best Practices - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2017 09:39 AM
Thank you, Chuck. Will read through these.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2017 06:30 AM
Hi Glenn,
Let me know if you are blocked on any specific details. Also helpful may be episode 33 of TechNow. We did a specific example of passing complex data via GlideAjax using a JSON object. It works well!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2017 09:42 AM
Thank you, Chuck. I checked out your TechNow video 33 and a few others, which were helpful. I have a shallow Java coding background so at the moment I am hitting impasses daily. Anything more specific I will post in another thread. Thank you again, for your support.