Line Items

Line items let you create dynamic tables that pull data from linked records - perfect for invoices, purchase orders, quotes, and any document with itemized entries.


Overview

Line items establish a relationship between:

  • Main record (e.g., Invoice)
  • Linked records (e.g., Invoice Line Items)

TypeFlow automatically generates a row for each linked record, so your table grows or shrinks based on your data.

Common use cases:

  • Invoices with product/service lines
  • Purchase orders with items
  • Quotes with pricing breakdown
  • Packing slips with items
  • Reports with data rows

Google Docs Template Setup

Step 1: Create a Table

In your Google Doc, create a table with:

  • Header row with column titles
  • One data row with variables

Step 2: Add the Loop Variable

In the first cell of your data row, add {{loop_0}} to tell TypeFlow this row should repeat for each line item.

Step 3: Add Field Variables

Add your field variables in each cell:

ProductQuantityPriceTotal
{{loop_0}} {{Name}}{{Quantity}}{{Unit Price}}{{Line Total}}

Important Notes

  • {{loop_0}} must be in the first cell of the data row
  • Field names must match your linked table's field names exactly
  • The table will automatically resize based on the number of line items

TypeFlow Configuration

Step 1: Select Linked Record Field

In TypeFlow, go to the Line Items section and select the linked record field that connects to your line items table.

Step 2: Map Your Fields

TypeFlow will show all fields from your linked table. Map each Google Doc variable to the corresponding field.

Step 3: Test

Generate a test PDF to see your line items in action. The table will automatically show all linked records.


Images in Line Items

To include images from your line items (e.g., product photos):

Template Syntax

{{loop_image_ProductPhoto}}

Replace ProductPhoto with your actual image field name.

Configuration

In TypeFlow, you can set the image width when mapping the field. The image will maintain its aspect ratio.


Multiple Line Item Tables

Need more than one line item table in your document? Use different loop numbers:

TableVariableUse Case
First table{{loop_0}}Main line items
Second table{{loop_1}}Additional items from different linked field

Each loop can connect to a different linked record field in TypeFlow.


FAQ

What are line items used for?

Line items are used for invoices, purchase orders, quotes, and any document that needs itemized entries. They pull data from linked records in your database.

Can I have multiple line item tables in one document?

Yes. Use {{loop_0}} for the first table and {{loop_1}} for a second table linked to different records.

How do I add images in line items?

Use the format {{loop_image_fieldname}} where fieldname is your image field. You can then configure the image width in TypeFlow.

Does the table resize automatically?

Yes. TypeFlow automatically adjusts the table rows based on how many line items exist in your linked records.

What if my line items aren't showing?

Check that: (1) You have a linked records field in your main table, (2) The linked records actually contain data, (3) Field names in your template match exactly, (4) {{loop_0}} is in the first cell of your data row.



Need More Help?

Was this page helpful?