REPEAT DIALOG; END REPEAT

PlaceholderA marker in an instruction or expression model that indicates where a value must be substituted. This value must be a literal value or a variable. Instruction and expression models help the developer use the correct syntax in a script. Replace With
DIALOGIn template development, represents the component in which the developer groups variables and other components. In document assembly, represents the group of questions in the Interview tab of the assembly window where users enter their answers. A dialog with a repeat style specified  

A REPEAT instructionA command in a script or template that performs a special task, such as inserting a template or asking a dialog at a specific place in the interview. gathers lists of answers and merges them into a documentThe file that is created after a template has been assembled..

For example, the following scriptOne or more instructions and/or expressions that generate a value or execute some kind of procedure. gathers a listTwo or more answers to one question merged in the document. 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 TitleA property of a variable or dialog that specifies a more user-friendly name for the component. For example, if project standards require components be named using notations, names like Employee Name TE may not make sense to a user. However a title like Employee Name can be used instead.: " + 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 chevronsThe double-angle brackets (« ») that surround a variable in a text template. Together, the chevrons and variable name make up the variable field, for example, «Client Name»., then clicking the Match Fields button.