Use Variables and Scripts in Prompts, Dialog Element Text, and Resources

You can further customize the interview process by including variables in prompts, in plain text resources, and in dialog element text. You can also include variables in dialog titles and Multiple Choice option prompts and merge text.

Additionally, you can include IF and REPEAT instructions in plain text resources. You should note, however, that placing an instruction in a resource will not cause variables used in the instruction to be asked during the interview. If an instruction relies on a variable being asked in order to be processed, you must make sure those references are resolved earlier in the interview, before the resource is displayed.

Referring to variables and instructions in other components can provide users with more specific information about the answer they need to enter during the interview. For example, if you ask for a defendant's name at the beginning of an interview, whatever name the user enters can appear in a prompt or resource later in the interview.

To customize prompts, dialog element text, dialog titles, plain-text resources, and Multiple Choice merge text and prompts

  1. Edit the component where you want to merge the variable reference or script. (See Edit a Variable or Gather Questions into a Custom Dialog.)
  2. Place your cursor where you want the variable reference (for example, a prompt, title, or dialog element text field), right-click, and choose Variable Field. The Variable Field dialog box appears.

To include variable answers in Multiple Choice merge text and prompts, you must either enter the variables at the Options tab, or you must manually enter the variable references in the options spreadsheet.

  1. Enter the variable information and click OK. The variable is merged in the field.
  2. Optionally, to enter a script in a plain-text resource, right-click in the Text field and choose IF Field or REPEAT Field from the shortcut menu, depending on the type of instruction you are inserting.

You can also merge variable field references by typing double-angle brackets (<< >>), followed by the variable name or instruction keyword. HotDocs will convert the double-angle brackets to HotDocs chevrons (« »).

If Component Manager is open, you can also drag a variable from Component Manager and HotDocs will automatically include the chevrons.