On a catalog form we have 3 select box variables(A,B,C) for each variable has 300 question choices , So when we select 'A' need to display some 'B' dropdown values and based on B need to populate 'C' values. So my question is how to do it dynamicall

Manureddy1
Tera Contributor

find_real_file.png

5 REPLIES 5

Shakeel Shaik
Giga Sage
Giga Sage

Hi @Manureddy 

 

I think, you need to create one custom table and store all choices.

and use list collector field type in catalog variables and add query in variables reference qualifiers.

 

 

If my response is helpful to you, please mark as Correct Answer/Helpful

Please check and let us know.

Thanks 🙂

Thanks,
Shakeel Shaik 🙂

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Manureddy,

1. If the fields are all reference fields, Cascading filters may be used. 

https://docs.servicenow.com/bundle/sandiego-now-intelligence/page/use/dashboards/task/create-cascadi...

2. It is also possible to use Lookup Select Box with Reference Qualifier. Following thread has a discussion on this topic.

https://community.servicenow.com/community?id=community_question&sys_id=e2ee3ee5db58dbc01dcaf3231f96...

3. Finally, onChange Client Script can be used to fill the select boxes based on end user's choice.

 

Mahesh23
Mega Sage

Hi,

 

Make use of lookup select box variable and configure the variable as mentioned below

 

Variable type : lookup select box 

Lockup from table : 'YOUR_TABLE_NAME'

Lookup value field : sys_id //select sys_id from the list

lookup label field : label

and check the "Unique values" checkbox

 

 

For B should be shown based on A

 

Variable type : lookup select box 

Lockup from table : 'YOUR_TABLE_NAME'

Lookup value field : sys_id //select sys_id from the list

Lookup label field: label

reference qualifier: javascipt:'application='+current.variables.'FIRST_QUESTION_VARIABLE_NAME'

 

variable attributes: ref_qual_elements=FIRST_QUESTION_VARIABLE_NAME

 

Regards,

Mahesh

Srikanth65
Tera Contributor

Hi,

We need to define dependent values for each choice list field. If the choice list field is dependent on another choice list field, enter the choice value on which these options depend.
For example, on the incident table, the Subcategory choice list is dependent on the Category choice list.

Please follow the steps to define dynamically:

1. Navigate to a form on which the field appears.
2. Right-click the field label(i.e. Sub-Service) and select Configure Dictionary

find_real_file.png


3. Go to the "Dependent Field" section, check "Use dependent field" and select field from the "Dependent field" which is dependent on the field choice list(i.e. Service) and save in form header.

find_real_file.png
4. After reload the same page, Go to the "Choices" Related list. Here you can give dependent value to the choices of field choice list. (i.e. "Service" choice)


For example, the choice of field "Service" can be dependent value to the "Sub-service" choice.

i.e. when you select 'Service' need to display which 'Sub-service' dropdown values.

find_real_file.png

like this way remaining..

5. Click Save.

 

If my reply helped with your issue please mark helpful ???? and correct if your issue is now resolved.
By doing so you help other community members find resolved questions which may relate to an issue they're having.