Attachments and documents

How do I show child-table rows in a document template?

Drag the form table onto the template so the editor writes the row loop for you, then insert columns with {{ Row.Field }} inside the table.

How-to

Short answer: Drag the form table onto the template. The editor adds the loop that repeats the table once per row. Inside it, insert each column as {{ Table_Name.Field }}.

Why it happens

  • A form table is a list of rows, so the template needs a loop to print every row.
  • "Action failed due to syntax error in document template" usually means a loop or condition tag was typed wrong, left unclosed, or edited.

How to fix it

  1. Open the document template editor.

  2. Drag the form table onto the template. The editor adds a line such as {% for Line_Items in Table__Line_Items %} above it and {% endfor %} below it. Keep both lines as written.

    Dragging a form table onto the document template editor

  3. Name the column headers.

  4. In the row, type double curly braces to insert each column, for example {{ Line_Items.Quantity }}. You can't drag a field into a table cell.

  5. Click Preview to check the output.

If you get the syntax error:

  1. Make sure every {% for %} has its {% endfor %}, and every {% if %} has its {% endif %}.
  2. If the loop lines were deleted or changed, drop the table in again.
  3. Check that bold or color isn't applied to only part of a tag.

See finding a syntax error for the full checklist.

Tip

The printed form always shows the account logo. For a process-specific logo, add it as an image in the template's header.

Related answers