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

END IF Instruction

The END IF instruction defines the end of a conditional region.

The END IF Instruction is available when you are creating a script in the Component Studio or from the Field Editor in a template.

You must use an END IF instruction after an IF instruction to close the conditional region.

At the end of a conditional region you create using an IF instruction (or any combination of IF, ELSE IF and ELSE instructions), you must add an END IF instruction to close the conditional region.

Instruction name Model After you drag and drop the model into the script tab:
END IF END IF You don't need to do anything further with this model.

Example

For example, in the following text, a HotDocs template uses an IF instruction to insert a paragraph about vacation time—but only if the new employee qualifies for paid vacation:

[IF Vacation Days] In addition, [Employee Name] shall be allowed [Number of Vacation Days:ten] for vacation time.

[Employee Name] shall also receive seven paid holidays, including New Year's Day, Memorial Day, Fourth of July, Labor Day, Thanksgiving (including the day after), and Christmas.

[END IF]

Each IF instruction must also include an END IF instruction, which tells HotDocs to end the conditional region within the instruction.

More complex situations can also be handled using IF expressions within computation scripts. For example, a single paragraph in a template may change depending on how close a project is to completion. Using the IF, ELSE IF, and ELSE instructions, the correct paragraph can be inserted:

IF Project Status = "Complete"

"Upon finishing the project…"

ELSE IF Project Status = "In Process"

"While working on the project…"

ELSE

"Before working on the project…"

END IF