REPEAT DIALOG; END REPEAT
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 Editor Information»
Editor: «Editor First Name» «Editor Last Name»
«END REPEAT»
Each REPEAT instruction must also include an END REPEAT 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 Introduction: Include Lists in Your Documents.
Repeats can not be nested more than four levels deep.
While editing complicated sequences, you can jump from the END REPEAT instruction to its associated REPEAT instruction, or vice versa, by placing the cursor within the REPEAT or END REPEAT chevrons , then clicking the Match Fields button.