set reference qualifier through script for Lookup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 05:34 AM
I am working on Eureka and looking help to set reference qualifier through script for Lookup Select box catalog variable. I have two variables:
- Application - Select box
- Operation — Lookup select box
I put reference qual = "u_application_unit=" + current.variables.application for variable "Operation".
But this works only on load not on change of variable Application variable. reference current.variables in the reference qualifier and have the field refresh when another variable changes
Can anyone help me how to do this.
Thanks
Chandan !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2016 07:50 AM
Hey,
i came across this old article by googling and the previous answers did not help. So I hope this is helpful for other peoples finding this topic:
If you want to onChange refresh the available choices of a Lookup Variables based on one ore more other dependent variables you simply need to add the ref_qual_elements attribute to the Variable attributes field of your Lookup Variable. (The field is may not be shown on the form by default so you probably need to configure the view). This attribute specifies a semicolon separated list of fields to be sent back to the server in order to get an updated reference.
Example: ref_qual_elements=category;request_for;type
This will refresh the available choices for the Lookup Variable everytime you change the category, request for or type variable on client side. I have observerd that every time the list refreshes the previously selected value will be cleared, so it cannot happen that the user will accidently save an invalid value
The attribute is documented in the following Wiki-Articles:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 06:50 AM
Thanks a lot niclas. Finaly correct answer. I had similar issue today,
I am putting working example for future reference:
I have two variables(Lookup select box) and on second variable I need ref qualifier:
javascript:'u_active=true^u_location!=' + current.variables.first_variable
This was evaluated just on load. But when I put on second variable attribute as you suggested:
ref_qual_elements=first_variable
Everytime first variable is changed, choices for second one are updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 02:33 PM
I cannot get "reg_qual_elements" working for List Collector. Anyone have any idea ?
I have a user field 'user' (reference) and Group (List Collector). The list collector is using advanced reference qual to get groups belonging to a selected user using script include...The problem i am facing is when i change user then this list does not get refreshed by putting ref_qual_elements = user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 11:00 PM
This is not working in service portal. can u please help me to get this worked in service portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2017 02:01 PM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Types of Service Catalog Variables
Dictionary Attributes
Visit http://docs.servicenow.com for the latest product documentation