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