Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Repeating Subform Set of pages with accumulating total fields. Possible?

Avatar

Level 6

UPDATE: I have figured out how to repeat the pages infinitely and get grand totals to appear, however I wanted the totals to actually accumulate every time a subform set is added and not have the entire form grand totals from page one on. Does that make sense? I have replaced the document with the updated one incase anyone is able to take a minute to help me figure this out.

A link to the updated file:

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

__________

Is there a way to script accumulating totals in tables that are located on a 2+ page (I say 2+ because there is a table on page 2 that has a repeating row) form that has been placed into a Subform Set so the user can add an instance of these two repeating pages an infinite amount of times? The trick is that I need to make accumulating totals in some of these fields as the user repeats the Subform Set of pages and fills out certain fields.

 

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Level 6

I figured this out for anyone who needs this. The code for the accumulating total box needed a [*] after each section of the field address. Here is the code: sum(Page1[*].subPart1[*].tblPart1[*].Row5[*].PageTot[*]) Now as I add an instance of my Subform Set, the totals now accumulate.

View solution in original post

6 Replies

Avatar

Level 6
I figured this out for anyone who needs this. The code for the accumulating total box needed a [*] after each section of the field address. Here is the code: sum(Page1[*].subPart1[*].tblPart1[*].Row5[*].PageTot[*]) Now as I add an instance of my Subform Set, the totals now accumulate.

Avatar

Administrator

@nowackem share the answer with community.

 

//I figured this out for anyone who needs this. The code for the accumulating total box needed a [*] after each section of the field address. Here is the code: sum(Page1[*].subPart1[*].tblPart1[*].Row5[*].PageTot[*]) Now as I add an instance of my Subform Set, the totals now accumulate.



Kautuk Sahni

Avatar

Level 6
@kautuk_sahni I'm kinda new here and this is the first time I've answered a question (even though it was my own, Ha!). How do I share the answer with the community?

Avatar

Administrator

@nowackem 

Welcome to the AEM Community. We need AEM SMEs like you in this community. To share any answer with the community in the future, always use "Reply" instead of "Comment". Commenting is more to know details about any of the Reply. So, always use "Reply" to the main thread when you want to share answers. As "Reply" can be marked as correct but not the comment.



Kautuk Sahni

Avatar

Correct answer by
Level 6

I figured this out for anyone who needs this. The code for the accumulating total box needed a [*] after each section of the field address. Here is the code: sum(Page1[*].subPart1[*].tblPart1[*].Row5[*].PageTot[*]) Now as I add an instance of my Subform Set, the totals now accumulate.