Multi Row Variable Set onChange event + How to reference mrvs from within mrvs

Li9
Tera Contributor

Hello,

I’ve been working with MRVS lately in a catalog item and have 2 questions which I couldn’t figure out.

  1. I have mrvs with 4 variables, assuming I need to trigger the same client script upon a change of any of these values, is there an efficient way to do it or should I configure dedicated onChange event for each variable?
  2. Is there a way to reference the entire mrvs from withing the same mrvs client script? For example I want to send the entire mrvs to script include upon a change of any value in the mrvs.

Thanks,

 
5 REPLIES 5

Sourav16
Kilo Guru

Hi,

You can create an onChange client script on the catalog item where the MRVS is used and use MRVS internal_name as the on change variable and do a GlideAjax call to send the value to the server using the newValue variable provided in the client script template.

 

Thanks,

Sourav

Li9
Tera Contributor

Hi Sourav,

When triggering onChange from the catalog level you can’t set it to trigger on the MRVS variable. For example in my case the MRVS internal name is p_apps_records however when the script applies to ‘catalog item’ it can’t be selected in the variable name:

find_real_file.png

The only option is to trigger the onChange from the MRVS level which is why I was asking the question. I know that I can access variables in the MRVS itself using the g_form.<variable> however this doesn't allow me to capture the entire set. 

Thanks,

 

1. Set the OnChange script Applies to = A Variable Set

2. Pick your variable set

3. Pick any variable within that variable set

find_real_file.png

The MRVS internal name does not show up in Variable Name field, nor does it work if I manually set the value.