Highlighted

Calculations

Avatar

Guest

09-09-2008

Hello,



I have a form with fields that I would like to have subtracted. The way that I had them set is not working..It's adding them instead...the field name(s) are as listed in the Hierarchy:



amt[0] amt[1] total_amt[0]

amt_1[0] amt_1[1] total_amt[1]



I want to take amt[0] and subtract amt[1] from it to get total_amt[0]. I was using the code sum(amt[*])...Of course, that was addition...Can't figure out how to make them subtraction. Once I get this figured out I want to take the row total_amt[0] (and [1], etc) and add those. For some reason sum(total_amt[*]) is not working for me. Can this be done?