HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Upload a template Create a script

ASK Instruction

The ASK instruction tells HotDocs to display in the interview, the dialog or variable you specify.

The ASK instruction is only available when you are creating a computation or from the Field Editor in a template..

There are three main ways you might use the ASK instruction:

  • In a custom interview computation – When you create a custom interview computation, you replace HotDocs default interview generation process with a computation, so you need to use the ASK instruction to display all the questions you need a template user to answer.
  • To adjust the order of an interview without creating a custom interview computation – To have HotDocs present a dialog or variable at a specific point in the interview, you can either use an ASK instruction in a computation placed at the appropriate time in the interview, or use the Field Editor to add an ASK Instruction field to the template.
  • To ask a specific variable or dialog only under certain circumstances – You can combine the ASK instruction with other instructions in a computation that instructs HotDocs to ask a specific variable or dialog in an interview. For example, you could use IF and ELSE instructions to tell HotDocs to ask one variable if the template user selects "Yes" on a True/False variable and ask a different variable if they select "No".

 If the variable is linked to a dialog, HotDocs displays the entire dialog.

Instruction name Model After you drag and drop the model into the script tab:
ASK ASK  ⟦VAR,DIALOG⟧ Replace ⟦VAR,DIALOG⟧ with any variable or dialog.

Example

A template author is creating a medical insurance form. They need to ask the template user for the name of their insurance company only if more than a year has passed since the template user last filled out the form. The interview already has the template user's information about any previous claims, so they just need to have HotDocs use that information to decide whether or not to ask the Text variable: InsuranceCompanyName.

They create a computation and in the Script tab they type the following:

IF MONTHS FROM( LastClaimDate, TODAY ) >= 13

ASK  InsuranceCompanyName

END IF

The first line of the script instructs HotDocs to look at the answer to the LastClaimDate Date variable and see if that date is 13 or more months from today's date. The IF instruction opens the conditional region and uses the MONTHS FROM function to find the number of months between the two days and compare it to the number 13. If 13 or more months have passed, the ASK instruction asks InsuranceCompanyName in the interview. If less than 13 months have passed, nothing new is added to the interview. The END IF instruction closes the conditional region.