Getting Sum Totals for Repeated Number Variables

You can use a computation variableA type of component that performs calculations or executes other instructions within the template. Computation variable scripts are created using the HotDocs scripting language. to find the sum total of a repeated number or computation variable. For example, you may need to find the grand total of a series of dollar amounts.

To total a column of number variables

  1.  If the repeated variable you are totaling is a list of Number variables, create a computation that contains the expression SUM( NUM_VAR ), or if you are totaling a list of Computation variables, create a computation that contains the expression SUM( COMPUTATION VAR ).
  2. Replace the NUM_VAR or COMPUTATION_VAR placeholder with the name of the repeated Number or Computation variable, respectively.
  3. Insert the computation variable containing the SUM instruction where you want the total to appear—for example, at the bottom of a column of numbers.