Dependent drop down lists in Record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 07:11 AM
Hello,
Can someone please help me to set up the following configuration :
In record producer, I should have two drop down lists dependents :
List 1 contains values (A - B - C - D - E)
If we select A, or C, or E, they dont have dependent choices
if we select B, another drop down displays (B1 - B2)
If we select D, another drop down choices display (D1 - D2) :
I created the virst list as variable (select box) and i filled the choices (A - B - C - D - E) :
But I didn't know how to add dependent choices on each choice !
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 07:18 AM
Hi @yasserbouat ,
Please refer this : Dependent Select Box (Choice) Variables on Record Producers
If my response helped, please mark it helpful and accept the solution so that it benefits future readers.
Regards,
Rohit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 07:21 AM
@yasserbouat In case of variables, you will not be able to define the dependent values. Instead you need to rely on onChange Client script triggering on the first variable to filter data for second variable.
Here is a sample.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
// Clear existing options.
g_form.clearValue('second_select_box');
if (newValue == 'B') {
g_form.addOption('second_select_box', 'B1');
g_form.addOption('second_select_box', 'B2');
} else if (newValue == 'D') {
g_form.addOption('second_select_box', 'D1');
g_form.addOption('second_select_box', 'D2');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 07:24 AM
Hello @Sandeep Rajput
Thanks for your reply, can you please tell me how to call this script to fill the choices ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 07:31 AM
@yasserbouat This onChange script will trigger on your first drop down which contains the values A,B,C,D.
For more information on onChange client script please refer to https://servicenowwithrunjay.com/onchange-client-script-in-servicenow/