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.

Access Catalog item variable inside MRVs

pk31
Tera Contributor

I have a requirement, In which I need to use catalog item variables inside MRVS.
In mrvs, I have one lookup select box, and I want to display values in the lookup select box based on the value of catalog item variable.

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@pk31 

no direct way

check this link

SOLVED: Issue with MRVS multi row variable set accessing the form values 

also check these links

Accessing other form variables from inside multi-row variable pop-up

Multi Row Variable Set: communication with main form

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar  is there any way to used catalog item variable in MRVs variables reference qualifier?

@pk31 

that I already shared in 1st link

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

fmelard
Tera Expert

Hi,

There is actually a "dirty" way to do this, by storing the main g_form object that can then be reused in the MRVS, I did that a long time ago, this looks like this.

 

OnLoad catalog client script on the item:

this.my_g_form = g_form;

 

Then you can use it in the MRVS client script like this:

var valueFromItemVar = this.my_g_form.getValue('[VARIABLE_NAME]');