The autocalc
tag is used to update a text field dynamically based on a mathematical expression.
In the example above, row variable AVG calculates the average of the table inputs.
Details
- The
autocalc
tag does not allow references to variables on pages other than the page where it is defined. - The mathematical expression can include basic operations such as addition, subtraction, multiplication, division, or average.
- The
autocalc
tag can reference:-
- specific variable names such as
autocalc: ($Q22R1 + $Q22R2 + $Q22R3)/3
, or - row reference notation using either specific rows, such as
autocalc: (__ROW1__ + __ROW2__ + __ROW3__)/3
or the shorthand when using all,autocalc: average(__ALLROWS__)
, or - column reference notation.
autocalc: (__COL1__ + __COL2__ + __COL3__)
or the shorthand when using all,autocalc: add(__ALLCOLS__)
.
- specific variable names such as
-
Additional examples
Total column using individual column reference
In the example below, the last column adds together the values from the first two columns using autocalc: (__COL1__ + __COL2__)
.
Average row using ALLROWS reference
In the example below, the AVG row averages together all of the values at each of the rows automatically via autocalc: average(__ALLROWS__)
without needing to specify each individual row.
Comments
0 comments
Please sign in to leave a comment.