HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Upload a template Create a script

SUM Function

The SUM function adds together the repeated values you specify; either: repeated Number variable values; or a repeated computation that returns a number value.

Supplying the SUM function with a repeating Number variable or a repeating computation returns a sum of all the repeated values.

Function name SUM
Usage model SUM( NUM VAR, COMPUTATION VAR ) 
Parameters The SUM function requires you to replace one of two parameters:

NUM VAR

The function finds the sum of the value or repeated values you select.

COMPUTATION VAR

The function finds the sum of the values in the computation.
Result A number value.

Example

In this computation script, HotDocs totals the values of the repeated Number variable Monthly Payment:

SUM( Monthly Payment )

In the next example, HotDocs then takes the total monthly payments the user is making and compares it to the user’s monthly income. If the monthly payments are greater than 36 percent of the monthly income, the loan application is rejected:

SUM( Monthly Payment ) > ( Monthly Income * 0.36 )