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

Calculating Percentage in Table

Avatar

Not applicable
I have a Designer 8.0 form with table that includes 12 rows, The table also has a header row (Descriptions) and footer row (where to total dollar amount is calculated) and three columns.



Column 1 Column2 Column3

Product Revenue PercentageofTotal

Row1

Row2

Row3

Row4

~

Row11

Row12

Total



I need to take the dollar amount entered by the user in the 2nd column (Revenue) and divide it by the total in the footer row (TotalAmount) to produce a percentage of the total in the thrid column (PercentageofTotal) for each row.



Example: Total = $10,000

Sum of TotalAmount / RowValue = Percentage of Total

Row1 5,000 50%

Row2 0

Row3 3,000 30%

Row4 2,000 20%



If the row doesn't have a dollar value, then I need the percentage column to remain blank. Does anyone know how I would right the script to do this?



I already have the form correctly calulating the dollar total, but when I try to create a script for the percentage, the form throws errors.



Any help would be greatly appreciated!!!
0 Replies