This document covers the following topics:
Create and edit a REPEAT instruction
Repeats with Computation Variables
Punctuate, Sort and Filter Your Lists
You can include lists of answers in your documents by repeating variable s and enabling your end-users to supply as many answers as necessary. You repeat variables by surrounding the variables with a REPEAT instruction . Instead of collecting and merging a single answer, as variables normally do, the repeated variable can merge an entire list of answers into the assemble d document.
For example, the following shows a REPEAT instruction inserted into a template:
This shows the list of answers the REPEAT instruction merged into the template:
You can create a list of repeated answers by inserting a REPEAT instruction 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.
When you create the REPEAT instruction, you are asked to create or select a custom dialog to control the instruction. During the interview, the user can answer the dialog over and over again, until they have listed all their pertinent property items.
Additionally, 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.
Often, you may need to repeat information within a word processor table. This is best done by repeating a single cell or an entire row.
Instead of inserting a REPEAT instruction 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.
By default, when HotDocs inserts a REPEAT instruction in the template, it includes a return character (similar to a paragraph mark in a word processor) after the instruction. During assembly, as the instruction is processed and removed from the assembled document, this return character is likewise removed. Depending on several factors, you may prefer to keep HotDocs from adding this character, or you may want to add a return character only under certain situations. You can specify an option that controls this. See also, Understand How Smart Returns are Inserted After Instructions.
You can make changes to REPEAT instructions after they have been created, including editing the repeated dialog's contents, adding a filter, choosing an answer-sorting order, and adding punctuation to the list of answers.
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—for example, DanielNathanEmilyKate. Once you select a punctuation style, HotDocs punctuates the list automatically—for example, Daniel, Nathan, Emily, and Kate.
When assigning a format, note that formats with all capital letters only capitalize the conjunction in the sentence, for example, the word AND. Individual answers in the list are either merge d as the user types them or merged as you have formatted them using a variable-level example format.
You can also have HotDocs 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 also create a computation script that filters a list so only the entries that meet some condition are merged into 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.
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:
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:
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, like this:
To accomplish this, you must do the following:
You can further customise REPEAT instructions in the following ways: