Differences Between SET and DEFAULT Instructions

Both the SET instruction and the DEFAULT instruction assign answers to variables. However, there are differences between the way the two instructions operate in a script. These differences are outlined in the following table:

SET Instruction DEFAULT Instruction
Sets the value of a variable each time the instruction is processed, even if the variable is already answered.

You should never SET a variable's value and then cause the variable to be asked later in the template. If you do this, the value assigned by the SET instruction will always overwrite the user's answer. If you want to suggest an answer for a user but give them the chance to change the answer, use the DEFAULT instruction.

Sets the value of a variable the first time the instruction is processed and if the variable is unanswered. (If the variable is already answered, the DEFAULT instruction has no effect.)
When the instruction is processed, causes HotDocs to prompt the user to save the answer file. (To avoid warnings like this, clear the Save in answer file option for the variable (Advanced tab of the Variable Editor).) When the instruction is processed, does not cause HotDocs to prompt the user to save the answer file.

If you intend to SET values for all the variables in a repeated dialog, you should make sure the Trim endmost iterations whose answers are grayed or hidden option is turned off for that dialog. Otherwise the dialog’s COUNT and/or the number of repetitions that show up in the interview outline may be unpredictable.