How to count "multi row variable set" row count on client script.

ravigupta
Mega Contributor

Hi,

I have one multi row variable set. which contains one single line text column. Under this I have another field which should contain the item/row added in multi row variable set. How can this achieve by client side.

Thanks

Ravi

 

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

I have used an onSubmit client script to check the number of rows added to a MRVS:

This is a list of serial numbers, where serial_number is the internal name of the MRVS

var snlist = g_form.getValue('serial_number');
var obj = JSON.parse(snlist);
var length = obj.length;

Hi Bradb,

what is the meaning of "internal name" of the MRVS? Is it name of MRVS?

Does this work on portal?

Thanks

Ravi Gupta

 

Brad Bowman
Kilo Patron
Kilo Patron

Yes, that's the name of the MVRS.  I haven't tried this on Portal.  I should have also mentioned the onSubmit is at the catalog item level, not on the MVRS client scripts.