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

Jamie Imms
Kilo Expert

Hello,

I am having trouble accessing other variables on a form from within the screen to add a row to a multi-row variable set.

If I run an onChange Client Script on a variable inside the multi-row variable, I don't seem to be able to access variables that are not in the multi-row variable.

Here is an example:

find_real_file.png

find_real_file.png

 

find_real_file.png

 

If I set the value in the Multi-Row Variable to "Yes", it should be printing out the value of the "Please Print Me" field in a field message, but it seems like I am unable to access it.

 

22 REPLIES 22

I want to be able to read it in the Desktop view. So if someone uses the Create New Request module and they search for it in the Service Catalog that it will work there too. Not just in the Service Portal.

Community Alums
Not applicable

Thanks a ton 🙂

Inactive_Use167
Mega Expert

Hi Jamie,

 

I am facing the same issue. Can I know how did you handled this?

 

Thanks

 

Harish Gubba

Step 1: Create Onchange client script at main item variable and set this.NOW.<att. name>

Step 2: create Onload client script in MVRS and access the same this.NOW.<att. name>

AccXXX123
Kilo Contributor

Hi everybody and @ryanlitwiller , I am trying to access 'application' variable on my catalog item and populate it on MRVS,

On my onChange script I have:

 this.NOW.applicationName = g_form.getValue("application");

and on my MRVS, onChange: 

g_form.setValue('application_mrvs', this.NOW.applicationName);

still get error in my console saying "(g_env) [SCRIPT:EXEC] Error while running Client Script "Test": TypeError: Cannot read property 'replace' of undefined", what am I doing wrong?

Is this more reliable than top.window.scratchpad? Since it only really works well for one browser tab?