HotDocs Models: repeat dialog; endRepeat

Placeholder Replace With
dialog A dialog with a repeat style specified

A repeat instruction gathers lists of answers and merges them into a document.

For example, the following script gathers a list of editors and inserts them into the assembled document:

[repeat:EditorInformation:

Editor: [EditorFirstName;te] [EditorLastName;te]

]

Each repeat instruction must also include an endRepeat instruction, which tells HotDocs to stop repeating the variables within the instruction.

This next computation script actually contains two repeated dialogs—one nested in another. It produces a list of editors as well as the titles and authors he or she is currently working with:

""

REPEAT Editor Information

RESULT + "Editor: " + Editor First Name + " " + Editor Last Name + "

"

REPEAT Book Information

RESULT + "Book Title: " + Book Title + "

" + "Author: " + Author First Name + " " + Author Last Name + "

"

END REPEAT

END REPEAT

You can create up to three levels of sublists by nesting REPEAT instructions. (See Introduction: Create Lists Within a List.)

For more information about creating lists of answers, see Mark Repeated Text.

While editing complicated sequences, you can highlight repeat instruction to its associated endRepeat instruction by placing the cursor within the repeat field, then clicking the Select Field button. (See Manage Markup Fields in the Document for details.)