List Operations
Introduction to Repeating Sections & Lists
Use the Repeat/Loop tab to dynamically render elements for each item in a list (like line_items). This is especially useful for things like tables, invoice line items, and grouped data.

Accessing the List Operations
To add loop to any element in your template:
Select the element you want to make repeating (text, image, section, table row, etc.)
Look for the "Edit Logic" button in the Properties panel on the right side
Click "Edit Logic" to open the Logic Editor modal

Creating Repeating Sections
List Field: Select the array field (e.g. line_items, tasks, entries) that should drive the repeat.
The selected element on the canvas will repeat once for each item in that list.
Each repetition has access to individual item data (e.g. name, price inside a repeated line_items block).

Sorting Options
Click + Add field under “Sort by fields” to specify how items are ordered.
Sorts can be ascending or descending.

Filtering List Items
Use the Filter List section to show only matching items. This functions in a similar manner to the Conditions Editor but scoped to the field you're repeating (e.g., line_items).

Nested Lists
You can nest repeaters inside each other:
Example: orders → line_items
Use separate repeat logic in each inner element tied to its own list field.
Data context will be handled automatically.
Limiting the Number of Items Displayed
This can be achieves using a custom expression as shown in the example:
@index < 5
Pagination Options
For large lists, you can paginate manually using custom logic:
Add a custom filter with @index >= start && @index < end
You can manage start and end via template inputs or dynamic context.
Example:
@index >= 10 && @index < 20

Autogenerated Fields vs Manual Fields
Manual inputs are mainly useful when you're using virtual fields or computed values, an example is when computing a group:
{{$var "events" ($group Events "type")}}
Here, events is a manually defined variable resulting from a grouped transformation. You’d use manual input to refer to this variable in later logic, since it’s not part of the original schema.
In the next section, we’ll explore how to use the Template Preview to test and refine your logic in real time. This lets you see exactly how your filters, conditions, and repeating elements behave with sample data—making it easier to catch issues and fine-tune your templates before publishing.
Last updated
Was this helpful?