I have a tricky issue now that I am hoping someone can help with. I have an 8 page XFA form where the first 4 pages cannot be made expandable because the recipient company has to scan them when sent in by customers - so layout has to stay fixed. On page 2 there are three tables with fixed number of rows where the user can declare their shares in different currencies. If they have more shares than the rows allow, or more currencies, they can go to page 6 where they can add other currencies or more of the same currency from page 2. Each currency subform on page 6 is dynamic, and can have as many rows as needed.
At the bottom of page 2 is where the totals of each currency for the whole form have to be declared individually - so £ from page 2 and page 6 (continuation), $ from page 2 and 6, and so on - reported as "£xx + $xx + Rxx".
I have the form dropping each page 6 subform totals of each currency into separate boxes (eventually to be hidden) so that they can contribute to page 2 totals.
The problem I have is that only the first instance from the page 6 currency contributing to the section 6 total - whichever currency is declared first. The others do not contribute.
The script (FormCalc)calling that is:
var do1 = Sum(topmostSubform.Page2.p2content.total_aggregate_nominal_dollar.rawValue) //page 2 value
var do2 = Sum(topmostSubform.Page2.p2content.total_aggregate_nominal_dollar2.rawValue) //alternative page 2 value
var do3 = topmostSubform.Page6.currency.Row2[*].calcs.total_aggregate_cont_dollar.rawValue //page 6 value
if (do1 >= 1)
then
$ = do1 + do3
elseif (do2 >= 1)
then
$ = do2 + do3
endif
What do I have wrong? Would I be better off in Javascript?