How to Calculate Value in Multi Row Variable Set in a Record Producer

Michael Gedzelm
Tera Contributor

Hello.  In my record producer, I have a multi row variable set with 3 variables:   price, quantity, and cost.  I want cost to be a read only calculated variable that is the product of price and quantity.  As the user changes price or quantity, cost should automatically recalculate.  I'm assuming that I would use an onchange client script but I have no idea what the syntax of the code would like like when using a multi row variable set.  Thanks for any suggestions.

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

Hi Michael,

Create 2 identical/similar Catalog Client Scripts that apply to the MRVS, not the Catalog Item when price and quantity change.  Since all three variables are part of the MRVS, the syntax is exactly the same as if they weren't - you can still use g_form.getValue/setValue....

View solution in original post

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

Hi Michael,

Create 2 identical/similar Catalog Client Scripts that apply to the MRVS, not the Catalog Item when price and quantity change.  Since all three variables are part of the MRVS, the syntax is exactly the same as if they weren't - you can still use g_form.getValue/setValue....