Skip to main content

Looper

A Looper repeats a block of content once for every record. It works like a Dynamic Table, but it is far more customizable. A Dynamic Table can only produce rows inside a table. A Looper can repeat any layout you build, such as a titled section, a card, or an image with text beside it.

Because of this, a Looper can do things a Dynamic Table cannot:

  • Repeat a custom layout. Design a block the way you want it to look, and it repeats for every record.
  • Nest multiple levels. Place a Looper inside another Looper to walk through linked data, such as each client and then each invoice under that client.
  • Add conditional logic. Show a block on some iterations only, such as the first record or every second record, or drop a conditional section inside the loop.

A good example is a project report, where each project appears as its own card with a heading, a status line, and a short description.

You can find the video tutorial here.

Create a loop

  1. Type / in the editor and choose Looper.
  2. Open the Properties panel on the right and choose what to loop over:
    • Linked Field: loop over the records in a linked record field.
    • Table: loop over the records of a table.
  3. Add any content inside the loop. Type @ to insert fields from the current record of the loop.

Turn on preview to see the block repeat, once for every record.

looper component in FlexiPage editor

Sort and filter records

You can control which records appear in the loop, and in what order.

  1. Hover over the loop and click the (more) icon (or you can find sort/filter options in the Properties panel).
  2. Choose Sort records to order the records by one or more fields, ascending or descending.
  3. Choose Filter records to keep only the records that match a condition. Use AND or OR logic to combine several checks.
looper component in FlexiPage editor

Show a block only on some iterations

Inside a loop, you can show a block on certain iterations only, such as the first record, the last record, or every second record. This is useful for repeating layouts, for example shading every other card, or adding a heading before the first item.

  1. Click inside a Looper and type /. Choose Loop Conditional Section. It appears in the list only when you are inside a loop.
  2. Add the content that should appear on the matching iterations.
  3. Hover the block, click the icon, and choose Set condition.
  4. Pick a position rule and click Apply Condition.

The available position rules are:

RuleShows the block when…
Is first / Is not firstthe current record is (or isn't) the first
Is last / Is not lastthe current record is (or isn't) the last
Index is even / Index is oddthe record's index is even or odd
Index equals / greater than / less thanthe record's index matches the number you enter
Every Nth iterationthe record falls on every Nth position
looper component in FlexiPage editor

Nested loops

Place a Looper inside another Looper to work through data that has more than one level.

Below is an example of a 3-level nested looper (with counter nodes) for a Bill of Materials report. You can find the tutorial here.

looper component in FlexiPage editor

And it's preview in the editor is shown below. Note that for nested levels, indentation is different and auto numbering with counter is also shown in nested form.

looper component in FlexiPage editor