HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Create regions and rules Customize an interview Upload a template

Repeated Region Overview

A repeated region allows users to add multiple instances of the same content to a document. This is useful for situations where you might need to add multiple dependents to an insurance document or multiple jobs to an employment document. When you create a repeated region, you designate a section of the template's content that you want to repeat as many times as needed. The number of repeats is determined by the user's answers to the variables in a repeated dialog.

Overview

When you create a repeated region, you add the REPEAT instruction to your template. You can use the REPEAT instruction to repeat any text, instructions, or other parts of a template. Everything inside a REPEAT instruction becomes repeatable together with the variables. When you create the repeated region, you are asked to create or select a custom repeated dialog to control the instruction. During the interview, the user can answer the dialog over and over again until they have supplied all the pertinent information.

Normally, HotDocs only allows one answer for a given variable, and each variable is asked only once. However, when you use a repeated region the user can answer the same variable repeatedly, and HotDocs inserts the content for each entry.

It's important to note that you cannot reference a non-repeated dialog in a repeated region. Additionally, you can create a repeated dialog without using a repeated region, but in that case, HotDocs will only paste in the first set of answers.

Workflow

To create a repeated region, you identify information in your base document that you would like to repeat, for example a list of dependent children. You replace the variable data in that section with placeholder fields. You then create a repeated region around the section you would like to repeat. You create a repeated dialog and place the relevant variables within it. When the user enters data into the repeated dialog in interview, the repeated variables and the region containing them is inserted as many times as needed.

You can create a repeated region inside a table in Word. When HotDocs places the interview answers into the final document it populates the table with a list of the repeated answers. You can also add a REPEAT instruction to a computation.

Create and Edit a Repeated Region

You create repeated sections in your final documents by creating a repeated region around a section of your template containing variables. This could be a single variable, to form a list, or an extensive section of the document, such as an appendix for each item's details. You can use the options in Field Editor to make refinements, including editing the repeated dialog's contents, adding a filter, choosing an answer-sorting order, and adding punctuation to the list of answers.

You also have the option to limit the number of answers a user can supply for a repeated variable. 

Create Lists with Repeated Regions

You can create a list of repeated answers by creating a repeated region around one or more variables. For example, perhaps you want to insert a list of personal property items with their associated values. You can create a variable for each of the two data types (items and values), and then repeat them.

For example, the following shows a repeated region inserted into a template:

[REPEAT Personal Property Items]

[Item] [Value]

[END REPEAT]

This shows the list of answers once the document is assembled:

Artwork 200

Bicycle 100

Camera 500

Use Repeating Regions in Tables

When you create a repeated region inside a word processing table, you can choose to repeat either selected content or an entire table row.

In this way, you could create either a list of items in one cell or a series of rows each referring to one set of answers.

A repeated region can also span an entire table where the REPEAT field is before the table, and the END REPEAT field follows the table, both fields being place outside of the table.

Use multiple repeated regions within a table

You can use both types of repeated regions - selected text and table row - within the same table multiple times. You can nest repeated regions in a table, provided you also correctly nest the corresponding dialogs and contain any non-row repeat instructions within a single cell.

HotDocs allows these different combinations of repeated regions in a table:

  • A regular REPEAT completely contained within a single table cell.
  • A row REPEAT that is the first field in the table row.
  • A row REPEAT repeating a row that contains a regular REPEAT in a single cell.

You can nest repeated regions:

  1. within a repeated row,
  2. within other single repeated regions or
  3. within a nested computation variable.

Repeats with Computation Variables

Instead of inserting a repeated region directly in a template to generate a list of answers, you can also use a REPEAT instruction in a Computation variable to create your list of answers. Using a computation enables you to quickly insert a list in more than one location in the template.

Punctuate, Sort and Filter Your Lists

If you’re inserting a list in sentence style, you must choose the punctuation you want for the list. If you don’t choose a punctuation style, the list runs together without any punctuation or spaces, e.g. DanielNathanEmilyKate. Once you select a punctuation style, HotDocs punctuates the list automatically, e.g. Daniel, Nathan, Emily, and Kate.

When assigning a format, note that formats with all capital letters only capitalize the conjunction in the sentence, such as the word AND. Individual answers in the list are either placed as the user types them or placed as you have formatted them using a variable-level example format.

HotDocs can alphabetize your list automatically, in either ascending or descending alphanumeric order (for example, A to Z and 1 to 9). You can also sort based on any repeated variable. If there’s more than one repeated variable in the REPEAT instruction, you can sort on two levels—for example, first on State, then on City (or cities within the state).

You can create a computation script that filters a list to include only the entries that meet specific conditions in the assembled document. For example, you could create a list of all the children in a family and then limit the list to include only those who are under the age of 18.

Choose a Presentation Style

You can choose how a repeated dialog appears during an interview, either by presenting the list as a series of dialogs, or as a single spreadsheet with multiple entry points.

Your options include:

  • None - Creates a dialog without a repetition.
  • Series - Creates a dialog containing an answer field for each variable. The user can choose to fill in another repetition of this dialog's questions by clicking a button at the bottom of the dialog.
  • Spreadsheet - Creates a dialog containing a spreadsheet that has a column for each variable on the dialog. Each spreadsheet row is a repetition of the dialog's questions. The user can choose to fill in as many rows as they need.

Customize Repeated Dialog Titles

You can customize the titles used for each repetition in a repeated series of dialogs. For example, perhaps you need to ask the user for a list of beneficiaries. By default, HotDocs displays this list in the interview outline using an incremented number, followed by the dialog title, e.g.

Beneficiaries
1: Beneficiaries
2: Beneficiaries

This approach may work in some situations, but in others, it may be better to customize the title for each repetition so the user knows what's in that particular dialog. For example, maybe you want the topmost icon in the list to use a generic title (like List of Beneficiaries), but you want the name of the beneficiary to appear for each individual repetition in the interview. This way, the user can easily review what's in each dialog, e.g.

List of Beneficiaries
1: Mary
2: John

Additional Options

You can further customize repeated regions in the following ways:

  • Control how many rows are visible in a spreadsheet dialog: By default, when displaying a spreadsheet dialog, HotDocs always shows 10 rows of the spreadsheet. If you need to show more or less than this number of rows, you can enter a specific number at the Dialog Editor. (This option doesn't limit the number of answers a user can give—it only controls the number of answers that can be viewed at any given time.)
  • Limit the number of answers allowed for a repeated dialog: At times, you may want the user to enter only a specific number of answers in a list. You can use the LIMIT instruction to limit the number of times a dialog repeats. Once the user reaches the limit, they can not enter any more answers.

  • Retrieve a specific answer from a list: At times, you may need to retrieve a specific answer from a list of answers. For example, maybe you have created a list of employees, but later in the document you need to place the name of just the second employee in the list. You can do this by using explicit indexing in a computation.
  • Retrieve information other than answers from a REPEAT instruction: You can use a Computation variable to retrieve or calculate information (other than a list of answers) from a REPEAT instruction, such as counting the number of minor children.
  • Get the sum totals for repeated number variables: You can use a Computation variable to find the sum total of a repeated Number or Computation variable. For example, you may need to find the grand total of a series of monetary amounts.
  • Count the number of entries in a list: You can use a computation script to determine how many times a user answers a repeated dialog. You can also use a an expression to number a list of answers automatically.
  • Make a list appear as one or more columns: Sometimes it makes more sense to have your list of answers appear in columns, rather than in a punctuated sentence. If you want to make the list appear in a column, include a hard return after the text in the REPEAT instruction.