Create a Temporary Variable
Variables normally get their values from the answers users enter during an interview, but sometimes you may want to have HotDocs assign an answer to a variable instead of allowing the user to specify the answer. This is especially useful in computation scripts where you use variables as temporary placeholders or counters in a loop. For example, a computation that uses a WHILE instruction may initialize and increment a Number variable to determine how many times to process the WHILE loop. (The WHILE instruction is only available in HotDocs 6.2 and higher.)
Variables whose answers are set in a computation script and not saved in an answer file are known as temporary variables. When you create temporary variables, you should set the appropriate options at the Advanced tab of the Variable Editor to cause HotDocs to treat them differently. In particular, the following three options should normally be cleared:
To create a temporary variable
- Create a new variable and edit the variable component. The Variable Editor appears.
- Click the Advanced tab. The dialog box changes to show several advanced options.
- Clear Ask automatically, Warn when unanswered, and Save in answer file.