DEFAULT 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 type of 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. in the templateA word processor or form document that has been converted to HotDocs format so that it can be automated. When in template format, changeable text in the template can be replaced with variables. Other instructions can be added as well, such as instructions that create lists, condition text, and insert other templates.
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 that corresponds with the variable type

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. suggests a value for a variable if the variable is unanswered.

For example, in the following scriptOne or more instructions and/or expressions that generate a value or execute some kind of procedure., the variable Attorney Name is defaulted to the literal value of Sam Jones:

DEFAULT Attorney Name TO "Sam Jones"

In this example, when HotDocs processes this script, it first determines whether Attorney Name has been answered. If it has, the DEFAULT instruction has no effect and HotDocs uses the answer already given. If Attorney Name has not been answered, however, HotDocs suggests the answer Sam Jones. When this variable appears during the 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., users can accept this answer by moving to the next dialogIn template development, represents the component in which the developer groups variables and other components. In document assembly, represents the group of questions in the Interview tab of the assembly window where users enter their answers., or they can enter a different answer in the answer fieldA place in the template that denotes where users' answers should be merged, or where a specific instruction should be executed. In a text template, a field is denoted by chevrons. In a form template, a field is denoted by a colored box that is overlaid on the form's static text..

You can also use a DEFAULT instruction to suggest an answer that has already been given in the interview. For example:

DEFAULT Trustee Name TO Client Name

In this example, when HotDocs processes this script, it first determines whether Trustee Name has been answered. If it has, the DEFAULT instruction has no effect and HotDocs uses the answer already given. If Trustee Name has not been answered, HotDocs then checks to see what answer has been given for Client Name and suggests that as the answer. It is important to note, however, that if Client Name is unanswered, Trustee Name will likewise be unanswered.

Do not use the DEFAULT instruction in the script of a repeating dialog unless the instruction is used in conjunction with a conditional expressionA command in a script that retrieves a special value. Expressions help calculate dates, sums, and so forth. (on another variable in the same dialog, at the same REPEAT index) or a LIMIT instruction. If you use it by itself in a repeated dialog script, it will always add an unanswered dialog to the interview, which will produce an incorrectly assembled documentThe file that is created after a template has been assembled..

The DEFAULT and SET instructions both assign answers to variables. Click here for an explanation of the differences between the two.

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