Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Can't get totals to sum across several pages


Level 1

Been struggling for ages to try and solve a nested subform calculation problem and flowing the totals across several pages to give a final total at the end. The form adds individual lines to a section and also adds new sections so it's not straightforward,

I've been trying various ways of using the 'var fields = xfa.layout.pageContent(0,"fields") which calculates the sum of the first page fine, but I can't get the Total Sum to carry forward to subsequent pages. I've tried various scripts that replace with '0' with page number type script but I've not found one that works.

I'm a real newbie at this and have used sample scripts to compile a customer ordering form for use on line but am stuck at this last bit.

Also, when a section flows onto a new page I'm getting a complete subform and not a continuing part of the subform (more an irritant than a technical problem at this stage)

I've uploaded my form to my website here and set the form up to add 3 lines for trial purposes.

Any help from you experts out there will be much appreciated. Thanks

0 Replies


Level 2

I would probably use numeric fields in a table rather stand alone fields.

FormCalc is a little more effcient than javascript with this sort of thing. I've used this method:

if (HasValue(ExpenseClaim.Page1.MiscExpenses.TableExpense.Row1.Cell6)

$.rawValue = Sum(TableExpense.Row1[*].Cell6);


$.rawValue = null