Use Operators When Scripting

An operator is a symbol or word that causes an operation such as addition or a comparison to be performed in a computation or expression. Most operators can be used when working with both number and text values.

There are three types of operators:

The following tables explain how each operator works:

Comparison Operator Description
= The two items in the comparison are of equal value. For example:

BirthDate = 17 Dec 1989

Employee Name = "Louisa Gehrig"

!= The two items in the comparison are not of equal value. For example:

if ExhibitA != true

if PlaintiffGender != "Male"

< The first item in the comparison has a lesser value than the second item. For example:

AccountBalance < 9000

counter < 10

> The first item in the comparison has a greater value than the second item. For example:

DependentAge > 18

<= The first item in the comparison is less than or equal to the second item. For example:

ClientAge <= 65

counter <= 2

>= The first item in the comparison is greater than or equal to the second item. For example:

TaxedIncome >= 75000

Arithmetic Operator Description
+ Add the different components of the script together. For example:

Value1 + Value2

ClientStreet + ", " + ClientCity + ", " + ClientState

- Subtract the different components of the script from each other. For example:

MonthlyIncome - AmountOfOwedChildSupport

* Multiply the different components of the script. For example:

PurchasePrice * 0.625

/ Divide the different components of the script. For example:

YearlySalary / 12

Logical Operator Description
AND The statement to the left and the statement to the right must both be true. For example:

if ClientIsMarried and ClientHasChildren

OR The statement to the left or the statement to the right must be true. For example:

if ClientIsSingle or ClientIsWidowed

NOT The two items in the comparison must not be equal to each other.

The final operator, the parentheses ( ), instructs HotDocs to perform the operation inside the parentheses first.