Making 3 dependant Lookup select box variables for Record producer

Supratik3
Tera Expert

Hi All,

 

There is a requirement where there are 3 record producer variables (all Lookup Select boxes with multiple choices), as per below conditions:

 

1. Subcategory <u_subcategory>

2. Request type<u_request_type>  (dependant on Subcategory choice option value)

3. Service <u_service> (dependant on Request type choice option value)

 

Referencing the article https://www.servicenow.com/community/developer-articles/dependent-select-box-choice-variables-on-rec... - I have the dependancy working for fields 1 and 2 as above (Request type values are dependant on Subcategory values) , however the dependancy of 2 and 3, i.e. Request type and Service fields is not coming properly, as Service field is not showing any choices, despite having multiple choice options.

 

Please let me know what am I missing, in order to make all 3 fields dependant, i.e. Request type depends on Subcategory values, and Service field depends on Request type values.

 

Thanks a lot in advance.

 

1 ACCEPTED SOLUTION

Hi Brad,

 

Maybe it's supposed to work like this, but I added the variable attributes in the 'Question' tab, and not the 'Type Specifications' tab, and is now working as expected.

View solution in original post

9 REPLIES 9

Brad Bowman
Kilo Patron
Kilo Patron

Well now obviously there's something different about the Service variable definition, but we can't possibly know what that is without seeing a screenshot of the Type Specifications tab.  It would help to see the working one for Request type also, and any differences between the underlying data for these two - are all three variables using the same / choice table?

Thanks for the reply.

 

Due to some confidentiality restrictions, I am unable to share screenhsot. I will type it out the best I can below: (other fields are blank/not required)

 

1. Type specifications for Request type:

 

Lookup from table: Choice <sys_choice>

Lookup value field: Label

Reference qualifier: javascript&colon;'name=sn_customerservice_case^element=u_request_type^dependent_value=' +current.variables.u_subcategory;

 

 

2. Type specifications for Service:

 

Lookup from table: Choice <sys_choice>

Lookup value field: Label

Reference qualifier: javascript&colon;'name=sn_customerservice_case^element=u_service^dependent_value=' +current.variables.u_request_type;

 

 

To answer your query-are all three variables using the same / choice table?- Yes, using the same choice table.

 

 

Do you have the Variable attribute on Service

 ref_qual_elements=u_request_type

to update the selections when the Request variable changes?  

Whenever I try to put the Variable attribute and save the form, it reloads and clears out the value every time, which is strange. Any idea why this may be happening? Thanks.