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

Calculation of numerical cells

Avatar

Level 2

Hi,

I have created a table in a dynamic form where the user can add or remove rows as required. In the final row which is fixed I want the cells to auto calculate the numbers entered in the cells above. Can this be achieved in LiveCycle Designer?

Many thanks in advance

Lee

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

this is no problem with a small calculation script in FormCalc.

Assumed your repeatable row is named "Row" and contains a field named "Amount" the script will look like:

$ = Sum(Row[*].Amount)

View solution in original post

0 Replies

Avatar

Correct answer by
Level 10

Hi,

this is no problem with a small calculation script in FormCalc.

Assumed your repeatable row is named "Row" and contains a field named "Amount" the script will look like:

$ = Sum(Row[*].Amount)

Avatar

Level 1

Hey radsmar, I have a similar situation.  I am trying to sum the first 9 rows of the "Premium" rows in the table below in the 10th row. The first 9 rows have a binding title of "Premium" and the 10th row has a binding title of "total".  I have put:

form1.#subform[0].Table2.Row10.total::calculate - (FormCalc, client)

$=Sum(Row[*].Premium)

but it doesn't work.  Any ideas?

Table.png

Hierarchy.png

Avatar

Level 7

I do not believe this will work the way you have it. The reason is that you have named the Rows Row1, Row2 etc. If you want to use the sample code then you will have to change the Rows to just "Row" or "Rows". When LCD sees this it will create a unique identifier i.e. Row[0], Row[1].

735807_pastedImage_0.png

Avatar

Level 1

Thank you very much!  That did the trick!

Cheers!