Avatar

Level 10

Hi, I hope I understand it now. try this in the calculate event

var result = 0; // initialise calculation
var rows = xfa.resolveNodes("Table1.*.(className=='subform')"); // select all row subforms (e.g. Row1, Row2, ...)
for (var i=0; i < rows.length; i++)
{
var item = rows.item(i);
if (item.PrePaid)  // If the row has a PrePaid field
{
  if (item.PrePaid.rawValue == "No") // If the expense is not PrePaid
  {
   result += item.Amount.rawValue;  // Add the amount to the result
  }
}
}
result
;

Regards

Bruce