Reference qualifier on one of the variable in MRVS on the basis of value of variable outside MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2020 11:40 PM
Hi experts,
I want to put a reference qualifier on a variable in MRVS on the basis of a variable value which is outside of that MRVS.
I came across one solution to ake use of Session information.
Here in my case, I have a variable "Requested for" whose value I want to store in session so that I can use it later for applying reference qualifier on a MRVS variable.
I am trying to use gs.getSession().putClientData('myData', usr); in script include which is called from an onchange client script.
but when I try to access the stored value (of Requested for variable) in client script using :
var val=g_user.getClientData('myData');
alert(" Oval: "+val);
it gives me "undefined".
What can be the issue?
Please refer following screenshots:
Is there any other way we can achieve this?
Thanks in advance!
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2020 11:51 PM
I'm pretty sure that the client data is only loaded when the form loads - it isn't dynamic.
Data added after the form is loaded won't be known by the form.
I'm not aware of any way to address this limitation at this time.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2020 11:54 PM
Shouldn't you be getting the session client data in the reference qualifier script?
It will not show in the client as per my other response.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2021 04:17 AM
Hey,
I'm having the same issue. Could you please share how it was resolved. I want the list to be filtered based on variable outside MRVS.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2024 01:14 PM
it's taking up columns space in the MRVS, but my solution is to create a duplicate column inside the MRVS to hold a copied value of my variable from outside the MRVS. I use an onload client script (on the mrvs variable set level) to set the value of this reference variable that can be hidden on the mrvs popup, but still shows on the variable set summary table ( sad face). then my reference qualifer can use this value as it's now 'inside' the mrvs. i don't know yet if it has a massive performance hit- we limit our mrvs design to 10 operational columns, with a few exceptions.