Expand my Community achievements bar.

SOLVED

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

Avatar

Level 6

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

Avatar

Correct answer by
Level 5

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

Avatar

Level 10

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

 

Sum(ExpandingRow[*].individualTotal)

 

Avatar

Level 6

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.

Avatar

Correct answer by
Level 5

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.

 

 

Avatar

Level 6

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.