How to get length of MRVS row count from client script

reddy8055
Tera Contributor

Hi,

 

How can I get length of MRVS row count. I am tried using the below script to get length, I am able to get length in CMS view (alerts are showing correctly).But in Portal, I do not see any alerts if I use JSON.parse, I am able to see alerts incorrectly if i use stringify. Any help??

 

var mrvs = g_form.getValue('vta_training_details'); // internal name of your MRVS
//alert(mrvs);
var obj = JSON.parse(mrvs);
alert(obj);
var MRVSlength = obj.length;
alert(MRVSlength);

 

thanks,