Learn About the ASSEMBLE Instruction

From HotDocs Wiki

Jump to: navigation, search

You can use the ASSEMBLE instruction to have HotDocs assemble another document or form after the current assembly ends. Unlike the INSERT instruction, an ASSEMBLE instruction waits until the main document is finished assembling before it starts assembling the new template. ASSEMBLE instructions can be used in both text and form templates, and they can cause both text and form templates to be assembled, regardless of the type of template where the instruction is used.

In addition to the information contained in the HotDocs Help, here is some further information about using the ASSEMBLE instruction:

  • If the template that contains the ASSEMBLE instruction shares the same component file with the template that will be assembled, the instruction should still work.
  • The way HotDocs processes an ASSEMBLE instruction is different from the way it processes an INSERT instruction. With the ASSEMBLE instruction, HotDocs finishes the main template's interview and then opens separate word processor sessions for each of the subsequent templates. Using the INSERT instruction interrupts assembly of the main template to ask the inserted template's interview. HotDocs then inserts the document at that point in the main template and continues with the main template's interview.
  • The ASSEMBLE instruction works only when the template is assembled from the HotDocs library. However, the template that is to be assembled using the ASSEMBLE instruction does not have to be in the library. It can be assembled from any location as long as the ASSEMBLE instruction contains the correct path and file name.
  • If you are using the ASSEMBLE instruction in a Computation variable, you cannot test it at the Computation script dialog box. You must exit the template completely and test it from the library.
  • The ASSEMBLE instruction may result in a recursive loop if an inserted template also contains an ASSEMBLE instruction that refers to the parent template. In such cases, HotDocs may stop responding and you may need to restart your computer. Avoid this type of template design error.