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

That is strange, and not out of box behavior.  Does Request type do the same?  I can't get that to do that in my PDI - even if I type something invalid, if the variable is mapped to a field or not.  Do you have a Business rule, Client Script, Data Policy, or UI Policy on the item_option_new table that is affecting the attributes field? 

Hi Brad,

 

Yes, adding the variable attribute on Request type field is doing the same, i.e. clearing out the value on saving the form.

 

I checked, and there are several out of box client scripts/Business rules etc on the item_option_new table , but none of them are customized in any form, i.e. all are out of box.

Try a list view of all variables in the left nav or item_option_new.list  Add the Variable attributes column if necessary, then find the Service variable and try to add the attribute via list edit.  If it still clears, we're down to an onCellEdit client script, or more likely a Business Rule.  In a list view of either you can add the script field and search for *attributes to see if any are affecting this field directly. Also try typing anything as an attribute on a reference type variable, for comparison. 

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.

The Variable attributes field is only on the Type Specifications tab/section out of the box.  Anytime you add the same field to more than one section, you will get erratic behavior on one or both of the appearances.