Avatar

Level 10

Hi,

The calculation needs to loop through all of the instances of row2 and determine what each row is (120 or 208).

Attached is a sample.

var nIndex = Table1.Row2.instanceManager.count;


var vCircuits = 0;



for (var i=0; i<nIndex; i++)


{



     var valor = xfa.resolveNode("Table1.Row2[" + i + "].Cell1").rawValue;



     if (valor == 120)


     {


          vCircuits += Math.ceil ((xfa.resolveNode("Table1.Row2[" + i + "].Cell2").rawValue / 120) / 20);


     }



}



this.rawValue = vCircuits;

Hope that helps,

Niall