Necessity of using ref_qual_elements in reference qualifiers

krishna134
Giga Contributor

I have been working on a requirement where when a field country is changed, I had to populate companies with the entered country

I have used reference qualifiers 

javascript: 'u_country=' + current.u_country;

which looks fine when the company field reference is a lookup, but when I changed the Choice List Specification to Dropdown with none the above code alone is not working, I had to add  ref_qual_elements.

ref_qual_elements=u_country


Can someone explain what is the necessity for added ref_qual_elements for reference when choice list spec is changed to a dropdown.
find_real_file.png


3 REPLIES 3

rahulpandey
Kilo Sage
Hi, Variable attribute ref_qual_elements is needed because reference qualifier query needs to know the latest value of parent element on which the loop up depends, in this case u_country. Look up qualifier behaves different than reference type element.

Hi Rahul, thanks for the reply but what I am wondering why there is a difference when Specification changed to dropdown, can you please provide insight on why this is behaving differently. 

G24
Kilo Sage

This may help.  Shows an example, with screenshots, and a link to functional documentation:

https://www.servicenow.com/community/developer-forum/how-to-quot-refresh-quot-reference-qualifier/m-...