Dynamic Table Sum Not Calculating on Commit

Avatar

Avatar

redbaron07

Avatar

redbaron07

redbaron07

17-06-2016

I am using the below code to sum a dynamic table.  Each time I add a second "Table1.Row1" row, and select the value that would render countU ==0 true, the Livecycle form will not re-calcuate the query correctly unless I re-select the first row "Table1.Row1" countU value.  In other words, the dynamic table has two levels of expansion.  When I try to add more row under each primary row, the calculation does not automatically run.  Any suggestions?  Thanks in advance!

var sumD = 0;

var countS = this.resolveNodes("TableA.Row1[*].Subform2[*].Table1.Row1[*].MBRS");

var countT = this.resolveNodes("TableA.Row1[*].Subform2[*].Table1.Row1[*].NON");

var countU = this.resolveNodes("TableA.Row1[*].Subform2[*].Table1.Row1[*].CLC");

for (var i = 0; i < countS.length; i++)

{

if(countU.item(i).rawValue==0)

{

sumD += (countS.item(i).rawValue * countT.item(i).rawValue);

}

}

sumD

View Entire Topic

Avatar

Avatar

Karwan_Mawlood

Avatar

Karwan_Mawlood

Karwan_Mawlood

19-06-2016

Please try to shar your form if possible, in order we can help you with you issue.

thanks.