This function accepts two number values (whether in the form number literals, Number variables, or expressions since HotDocs resolves any of these to a number value), compares them, and returns whichever is the larger number value.
Function name | MAX |
Usage model |
MAX ( n1:NUM, n2:NUM ) |
Parameters | This function requires you to replace two parameters: |
n1: NUM |
The function determines which of the two number values is greater. |
n2: NUM |
The function determines which of the two number values is greater. |
Result | A number value. |
In this example, HotDocs evaluates the values of two Number variables called Monthly Salary and Monthly Expenses, then, returns the value of whichever of them is greater:
MAX( Monthly Salary, Monthly Expenses )
After you download the example template, you can import the template to any workspace to see this example code in action.