
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 06:06 AM
I've got a record Producer where one variable is named "myLoaction" (reference: cmn_location) and the value of this is to be used as a reference qualifier for another variable named "myAsset" (reference: alm_asset).
This is quite easily accomplished by using:
javascript:'location='+current.variables.myLocation.toString();
Unfortunately, it seems that this only works if both variables reside either directly on the RP or in the same variable set.
My challenge, is that I need "myLocation" to reside directly on the RP, whereas "myAsset" needs to reside in a variable set.
When I implement this, the reference qualifier no longer works, as it appears that the variables then operate in different scopes.
Top make this more complex, my variable set is of type multi-row. So for each row added to the VS, you should be able to select an asset that is qualified based on the location on the RP.
Anyone who has come across this challenge in the past and has some thoughts on how it can be resolved?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 01:36 AM
Thanks for your efforts Tyler.
I ended up coding a work around. Basically what I did was have an onChange client script on the location variable in the RP which then writes the value to the logged in user's user record. Then in the MRVS I use an onLoad client script to set the value of it's location field based on the field on the user's user record.
Not very elegant, but it works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 06:49 AM
Have you tried
current.variable_pool.myLocation.toString();
I know there are some known scoping issues with .variables only working within that variable set.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 07:00 AM
Tried, but no dice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 11:45 PM
Apparently what I'm trying to do is not supported. Anyone have any suggestion for a workaround?
https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogVariableSets.html
- Variables that are not included in a multi-row variable set cannot be used in dependent reference qualifiers for variables in the multi-row variable set. Similarly, the variables included in the multi-row variable set cannot be used in dependent reference qualifiers for variables that are not in the multi-row variable set. For a reference qualifier, the current row is the one that is being edited.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2018 09:49 AM
I think I missed your previous note, about it being a multi-row update set. That does make it way different.
The only other way to mimic reference qualifiers that I know of is to either user like onChange client scripts to update the field values. I guess onDisplay business rules might be able to as well.
That being said, I'm not very familiar with Multi Row variable sets. From some reading, I've seen there are some limitations and special syntax you have to use to reference variables.
I'm assuming to do this kind of functionality you would need to dynamically find which row the user updated, and then dynamically update that row's variable filter.
https://community.servicenow.com/community?id=community_blog&sys_id=865b5aeddbc023c0feb1a851ca9619f9