Good morning all;
I have a subform with repeating rows. Robert was kind enough to give me the code for calculating subtotals.
When I adapted the code for my form, I have an issue.
The first line does fine, and the calculations total as they should. When I click the button to add the second row, the calculated box clears.
This is the adapted code:
var decTotal = 0;
for i = 0 upto Table1._Row1.count - 1 step 1 do
var strCash = xfa.resolveNode(Concat("Table1.Row1[", i, "].FundList")).rawValue
if (strCash eq "1") then
decTotal = decTotal + xfa.resolveNode(Concat("Table1.Row1[", i, "].Cell9")).rawValue
FundList is a dropdown with bound values.
I've been over it several times and cannot figure out where I'm going wrong. Any help would be greatly appreciated.
Thanks in advance!
I think you are missing the decTotal at the end to return the answer
That was it. Thank you!