Access Parent/Other variables inside MVRS
How to Access parent/other variables from MVRS ?
As we all know that on click of an add button in MVRS we can access variables only which is in MVRS and there are many scenarios we would need some value from the parent/main form.
So here is a trick to get the parent variables from MVRS
Ex Scenario: In the main form, I had a reference field [Application profile] and onload of the MVRS, needed to access the application profile.
so I have written an onload client script by accessing the parent variable.
var vals = parent.g_form.getValue('application_profile');
Screenshot 1 - Application Profile
Screenshot 2 - Get this value onload of MVRS and sets the Pool Member Profile
screenshot 3 - OnLoad Client script on MVRS
Helpful Links:
https://community.servicenow.com/community?id=community\_question&sys\_id=5d28d390db272300fb115583ca961920
http://rubenferrero.com/servicenow/multi-row-variable-set-form-communication/
https://www.servicenow.com/community/itsm-articles/access-parent-other-variables-inside-mvrs/ta-p/2305695