Set a Variable Using the UNANSWERED Expression Model

HotDocs Version:HD6, HD2005, HD2006, HD2007, HD2008, HD2009
Word Processor:Microsoft Word, WordPerfect
Added to Knowledge Base: 

You can set variables to be unanswered by using the SET VAR TO VALUE instruction in a Computation variable or other script. This may be useful if you want to either clear the value from a variable, or set a variable to some other value later in the template. Thus, to clear the answer for a variable named Text Var, the instruction would appear as follows:

SET Text Var TO UNANSWERED

You should be aware that the UNANSWERED instruction model is not the counterpart to the ANSWERED model. Instead, the UNANSWERED model is a value or an answer (albeit "empty") that is associated with a variable. On the other hand, the ANSWERED model is a parameter to test if certain conditions are met, such as IF ANSWERED or IF NOT ANSWERED. If you are trying to test whether a variable is answered, use the ANSWERED or NOT ANSWERED models. If you are trying to assign a value to a variable, use the UNANSWERED model.

Caution: The UNANSWERED model should not be used with an IF instruction, especially if the IF instruction contains other instructions, such as SET. This is because as soon as HotDocs determines that the conditioned variable is unanswered, the logic in the IF statement is cancelled and any other scripting within the condition (like the SET instruction) is left unprocessed.

To set a variable to be unanswered in a Computation variable

  1. Open the Computation Editor.
  2. Place the text cursor in the script where you want to set the variable to be unanswered.
  3. Drag the SET VAR TO VALUE model from the Instruction models list to where the text cursor is.
  4. Drag the variable you want to appear as "unanswered" from the Components list and place it in the VAR placeholder.
  5. Select the VALUE placeholder and type UNANSWERED (in all capital letters).