Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Passing variable outside Multi row variable set to a reference qualifier

Bhagya Lakshmi1
Kilo Contributor

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? 

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

Below article should be useful to you

 

https://community.servicenow.com/community?id=community_article&sys_id=8014d1dadb9a20509e691ea66896197a

 

Regards,

Sachin

Michael Jones -
Giga Sage

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

find_real_file.png

Variables in my MRVS

find_real_file.png

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

find_real_file.png

click add - only option is Abel Tuter.

find_real_file.png

change it up and try again

find_real_file.png

find_real_file.png

 

But as you can see, there is that pesky Qualifier field in the list. 

find_real_file.png

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!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!