Avatar

Level 5

Hello Harry,

  Try the below syntax and replace your code.

this is in formcalc.

    var List = ref(xfa.record.Invoice.InvoiceSummary.ListOfTaxSummary.TaxSummary)
    for i=0 upto List.nodes.length - 1 step 1 do
         $.rawValue = List.nodes.item(i).Tax.TaxAmount.value    

    endfor

Or the syntax for foreach you can use is:

var total = 0.0

foreach expense in ( travel_exp[*], living_exp[*],parking_exp[*] ) do

total = total + expense

endfor

Hope this helps.

Regards,

Chaitanya