Passing variable outside Multi row variable set to a reference qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 11:19 AM
Hello,
I need to pass a variable from a single row variable set to a reference qualifier variable in a multi row variable set. How can I achieve this?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 11:31 AM
Below article should be useful to you
https://community.servicenow.com/community?id=community_article&sys_id=8014d1dadb9a20509e691ea66896197a
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 12:17 PM
It's a bit ugly, but you can do it - you have to add a variable to MRVS to hold the value of the variable from your item and set it onload of the MRVS. You can make the field on the MRVS read-only and hidden, but it will still show the value in the list of rows.
My very simplified example:
Variable on the item
Variables in my MRVS
My onload script for the MRVS
function onLoad() {
g_form.setValue('qualifier', g_service_catalog.parent.getValue('reference_qualifier'));
}
Load the form and type in a Reference Qualifier
click add - only option is Abel Tuter.
change it up and try again
But as you can see, there is that pesky Qualifier field in the list.
You could probably blank out the value with an onsbumit script in the MRVS, but the field will still be there.
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!