Performing calculations in an expanding table



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 - 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))


Run Sheet.JPGRun Sheet(2).JPG

Accepted Solutions (0)

Answers (0)