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

SOLVED

How do you calculate totals of one table with the totals of a table within a repeating subform?

nowackem
Level 5
Level 5

On page 3 of this form, I have two tables and the second one is in a repeatable subform. The goal is to have each of the Amount columns to total at the bottom of each table and then display a grand total in a small third table at the bottom and I have that working. The issue is that if I click the Add Amendment button where I add an instance of the subform, thats when the calculations do not get included into the grand totals. Please see the link to the form below, I have attempted the calculations in the tblTotals table if someone doesnt mind taking a quick look.

https://drive.google.com/drive/folders/1ug_vmOWQMhVu5Px5MTK6GIZmPXSbMuUy?usp=sharing

 

Thank you!

Emilee

 

1 Accepted Solution
MHWinter
Correct answer by
Level 3
Level 3

Try this:

sum(subOriginalDivisionCost.tblOriginalDOC.Row10.totalFedFunds, subAmendment[*].tbleAmendment.Row10.totalFedFunds)

 

(I replaced the "+" by a ",", and removed the "[*]" from non-repeatable items).

It seems to be working on my side.

 

 

View solution in original post

4 Replies
radzmar
Level 10
Level 10

For a total of a table you can use the [*] accessor to address multiple instances of an object.

 

Sum(ExpandingRow[*].individualTotal)

 

nowackem
Level 5
Level 5

Yes, I understand that part and I have that working in both of the tables. I cant get those total fields in the Amendment table (tbleAmendment) of the repeatable subform to be a part of the grand total calculations. Please check out my link and click the "Add Amendment" button. Then put some numbers in that table and they will not calculate with the rest of the form. 

Thank you for your time, I appreciate it.

MHWinter
Correct answer by
Level 3
Level 3

Try this:

sum(subOriginalDivisionCost.tblOriginalDOC.Row10.totalFedFunds, subAmendment[*].tbleAmendment.Row10.totalFedFunds)

 

(I replaced the "+" by a ",", and removed the "[*]" from non-repeatable items).

It seems to be working on my side.

 

 

nowackem
Level 5
Level 5

Perfect! Thank you, I knew it was something simple that I was missing. I tried so many different scenarios but just couldn't get it going. I appreciate you helping me solve this issue.