- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 03:54 PM
Within a service catalog item, within a variable's onchange script, is there a way to set the reference qualifier of another variable within the same catalog item?
Thanks!
- James
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:37 AM
Try
javascript:new TravelPlanReferenceQualifier().setTheQualifier(current.variables.selected_destinations.toString())
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 04:17 PM
You can use an Advance Reference Qualifier to get the value of the variable and a Script include to get the query you need
the code you insert is = javascript: new scriptinclude().Function();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 04:29 PM
Hi James,
You can give a try using Dynamic Reference Qualifiers:-
Reference Qualifiers - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 05:19 PM
Can you give an example of what you are trying to do?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:32 AM
Hi Guys,
Thanks for your responses. Much appreciated, however I think I still need some assistance.
Here is my use case:
1. End user opens up catalog item "Mobile Travel Plan" with multiple checkboxes and a drop down.
2. User clicks a few of the checkboxes "Will you be traveling to Africa?: YES", which causes the reference field "Select a Plan" to be cleared out.
3. User clicks the "Select a Plan" reference field and sees only the travel plans which relate to africa (There is a column in the reference table containing the countries that plan applies to "AF,CS,CA,US,etc etc"
If I understand correctly, is the idea that I should create a script include that accepts the checkbox values as variables, and then set the advanced reference qualifier to call that function and pass the checkbox values as parameters?
(My assumption is that I wont be able to access the form values directly from code within the script include)
Thanks again,
- James