Set a Variable Using the UNANSWERED Expression Model

From HotDocs Wiki

Jump to: navigation, search

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.

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 UNASNWERED (in all capital letters).