SET VAR TO VALUE

PlaceholderA marker in an instruction or expression model that indicates where a value must be substituted. This value must be a literal value or a variable. Instruction and expression models help the developer use the correct syntax in a script. Replace With
VAR Any variableA component that is used to represent changeable text (such as names, dates, numbers, etc.) in the template. Types of variables include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information.
VALUEIn an interview, it represents a user's answer. In a script, it represents data that must be used in executing the script. (The value can either be a literal value or a user's answer.) A value appropriate for the associated variable

For a more detailed explanation of setting variables to values, see Automatically Assign Answers to a Variable.

This instructionA command in a script or template that performs a special task, such as inserting a template or asking a dialog at a specific place in the interview. lets you specify a given value for a variable’s answer automatically, rather than allow the userThe customer, client, or person who assembles documents from templates. (See also template developer.) to specify an answer. With the SET instruction, you can transfer names and other values from one variable to another.

For example, if the plaintiff is the same as the client, you can use a SET instruction to automatically enter the plaintiff’s name as the client’s, saving the user from typing the name a second time:

IF Is Plaintiff Also Client

SET Client Name TO Plaintiff Name

END IF

The SET Instruction can also be used to set custom error messages in interview dialogs. Used with the ERRORTEXT expression in a dialog script, SET can be used to create conditional error messages to help minimise incorrect answers. To see examples of this method see ERRORTEXT.

Because HotDocs repeatedly processes SET instructions during the course of an interviewA series of dialogs, each containing one or more questions which HotDocs generates from the variables you add to your template. The template's user must answer the questions in the interview before HotDocs can assemble a custom document. You can view the interview by clicking the Interview tab of the assembly window. The left pane of the assembly window displays an outline of the interview. As the user answers questions, the outline tracks the user's progress through the interview., you must not let the user specify a different answer for a variable whose value is being SET. When HotDocs updates the interview, the user’s answer will be replaced with the value from the SET instruction. To suggest an answer for the user and allow them to change it, use the DEFAULT instruction. (See Differences Between SET and DEFAULT Instructions for an explanation.)

If you are grouping two or more child (inserted) dialogs in a parent dialogA dialog that contains a child dialog., you can SET the child dialog's status to TRUE. This forces the contents of the child dialogA dialog that is inserted within another dialog. When it's inserted, it becomes linked to that dialog—users can't answer questions in it without first viewing the parent dialog. Usually the two dialogs are related in content or purpose. to automatically appear in the interview outlineSee interview outline.. (See Group Child Dialogs in a Parent Dialog for details.)

To set two or more options for a Multiple Choice variable, separate each option with a vertical bar (for example, SET MC Variable TO "Option1|Option2|Option3")