Learn How HotDocs Updates Interviews

From HotDocs Wiki

Jump to: navigation, search

HotDocs interviews are dynamic, which means they change as questions are answered. Using dialog scripts, IF expressions, and other automation features, template developers control how much the interviews can change. For example, dialogs with variables that are hidden or shown depending on answers to other variables will change, whereas dialogs without a dialog script will not change.

Trigger Variable

To understand how, and when, HotDocs updates interviews, you must first understand the concept of trigger variables. When the interview first begins, HotDocs processes the entire template to create the initial interview, which consists of an interview outline containing the names of all of the dialogs and the dialogs containing the questions to answer. As questions are answered, some variables have the potential of changing the contents of the interview, depending on how they are answered. These are the trigger variables.

Trigger variables can be classified into two categories based on how much of the interview is updated when their answers change. The first group of trigger variables causes the entire interview to be updated. For example, a True/False variable that causes an entire dialog to be asked or not is considered an interview trigger. Other variables, such as those used in a dialog script to GRAY or UNGRAY variables, are classified as dialog triggers because they cause only a single dialog to be updated.

Instant Update

As answers are entered in the interview, HotDocs automatically updates the interview or dialog whenever it encounters a trigger variable. Depending on the complexity of your templates, this process may be slower than desired, especially when the entire interview is updated in response to interview trigger variables. For example, when you change the answer to an interview trigger variable and press the Tab key to move to the next answer field, you may experience a noticeable delay.

You can use the Instant Update feature to control when HotDocs updates the interview outline in response to interview trigger variables, thereby minimizing the number of times the interview is updated. To control when HotDocs updates the interview outline, click the Instantupdate.gifInstant Update button at the assembly window. When the button is selected (or pressed down), HotDocs updates the outline as you move between answer fields. When the button is not selected (or not pressed down), HotDocs updates the outline only when you move between dialogs.

Update Counter

You can also see how often HotDocs updates the dialogs and interview outline when you test assemble a document. (To test assemble a document, edit the template in your word processor (text templates) or HotDocs Automator (form templates) and click the Assemble.gifTest Assemble button.) The test assembly window contains an update counter in the status bar to help you determine how frequently HotDocs is processing interview as well as dialog scripts. For example:

Refreshcount.png

These numbers can help you identify automation problems in your template that are causing the interview to behave sluggishly. Each number generally corresponds to the number of times interview and dialog trigger variables are encountered:

  • Interview Script Update Count: The number on the left is the interview script update count. It shows the number of times the interview script has been processed during the current assembly session. Each time the script is processed and the appearance of the interview is updated, usually because the answer for an interview trigger variable has changed, the number is incremented.
  • Dialog Script Update Count: The number on the right is the dialog script update count. It shows the number of times a dialog script is processed while the dialog it represents is the current dialog. Each time a dialog script is processed while the user is changing answers in the dialog, this number is incremented. This count is most useful to watch while you're at a dialog and changing answers.