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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Performing calculations in an expanding table

Avatar

Level 1

I am having an issue performing calculations in a dynamic (expanding) table. I have created "Add Row" and "Remove Row" buttons to enlarge and shrink my table as I have more data to log. However, I cannot seem to get the calculation to reference the row I am currently working in and the previous row as I move down the table. I succeeded in getting the calculation to run properly, but it is always based on the first instance of the row. I am calculating in the same columns in each row, but I need the calculation to be made between the current row, and the most recent instance prior to it.

Can anyone help me with this one? Thanks in advance. I'm sorry, I haven't figured out how to upload a PDF yet for sure, but I think this may do it (Shared Files - Acrobat.com). Here is a copy of the FormCalc Script I am using to accomplish this, and I have included a couple of screenshots of my form in case it may help in some way.

if (FeedBtlVol>0) then

((Row1[*].FeedBtlVol-FeedBtlVol)/((Time2Num(Time.formattedValue, "h:MM A")-Time2Num(Row1[*].Time.formattedValue, "h:MM A"))/60000))

endif

Run Sheet.JPGRun Sheet(2).JPG

0 Replies