Question
Hello,
I have an Edit Table where users can add rows containing various numbers.
I want to have a row that always remains at the bottom and is a calculation of the above (using %CALC)
Any ideas how this can be done so the users can't edit the "Total" Row?
Environment
--
JamesBarker - 02 Feb 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
A simple solution is to turn those cells into header cells (as I did with your example). You can also try to use
%EDITCELL{}% of type label.
--
PeterThoeny - 02 Feb 2006
Thanks Peter but as you can see that has not solved my problem
I need the total row to always be at the botton even when a new row has been added to the table
--
JamesBarker - 03 Feb 2006
Hmm, barring changing the
EditTable plugin we need a function that is the analog of ABOVE() called BELOW() - return the range of cells
below the current cell. Then you can calc your totals in a hidden row at the top then stuff them into vaiables and refer to those variables in a separate "totals" table.
OR, teach
EditTable to ignore "footer" lines when adding rows!
--
SteveRJones - 04 Feb 2006
This Plugin does not support footer rows at this time.
You can run the totals after the table.
$ROW() still holds the value of the last row, so you can run the totals even if the CALC is outside the table. However, you cannot calculate the totals in a new table because this resets the table values. As a workaround you can do the CALCs in a HTML table; or you can do the CALC after the table, assigning the totals to CALC variables, then read & display the variables in new table below the edit table. You would need to define the column widths so that the tables columns align.
--
PeterThoeny - 05 Feb 2006