Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Subtotal Help

Avatar

Level 2

Any chance that someone might be able to help me develop a subtotal button that when clicked gives subtotals for each column for the table in the activity subform of the attached file?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You will have to give each cell in the table a name .....I named each cell in the salary column salaries. This allows me to use a FormCalc expression that will reference the multiple Rows.salaries element. Look at the line of code on the Total field for Salaries. I will leave it to you to do the rest.

Paul

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

You will have to give each cell in the table a name .....I named each cell in the salary column salaries. This allows me to use a FormCalc expression that will reference the multiple Rows.salaries element. Look at the line of code on the Total field for Salaries. I will leave it to you to do the rest.

Paul

Avatar

Level 10

Hi,

I would give each cell in a row a name in the hierarchy view. Then apply that name in each row.

The row total is Formcalc and is:

salaries + benefits + service + computerSoft + computerHard + travel

Then the column total uses the fact that the row names are the same (Row1), FormCalc:
$ = Sum(Row1[*].salaries[*])
I would right align the currency cells.
Hope that helps,
Niall

...snap...

Avatar

Level 2

Let me try this out. Thanks for your advice.

Susann K. Wenzl

Office Associate IV

Curriculum, Instruction, and Innovation Team

Nebraska Department of Education

301 Centennial Mall South

Lincoln, NE 68508

Phn: 402-471-6692

Fax: 402-471-0117

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----