0

I am using the following code and the result isn't the actual sum of the values, but returns the values in order: $1.00, $2.00, $3.00 shows 123.00, not the expected $6.00

var oFldSub = this.getField("Sub");
if(oFldSub != null)
{
   var  aLineSub = oFldSub.getArray();
   var sum = 0;
   for(var i=0;i<aLineSub;i++)
   {
       if(!isNaN(aLineSub[i].value))
          sum += aLineSub[i].value;
   }
   event.value = sum;
}
else
   app.alert("Form Error");
j08691
  • 204,283
  • 31
  • 260
  • 272
AngelJS
  • 1
  • 2

0 Answers0