Record repeater

Record repeater

The Record Repeater turns any Salesforce query into arbitrary portal UI without a custom component. You design one item inside the repeater on the canvas, using the normal blocks and Tailwind classes, and the runtime repeats it for every record.

How it works

  1. Drop Record Repeater on the page. It arrives with a sample card inside.
  2. In the configuration modal choose the object, the fields the template may use, a filter, a sort order and the layout classes of the container (for example grid grid-cols-1 md:grid-cols-3 gap-4).
  3. Edit the sample card on the canvas. Anything inside the repeater is the item template.
  4. Save. At runtime the children are replaced by one copy per record.

Merge syntax

The item template uses double square brackets so the tags survive the page level {{ }} merge:

Tag Meaning
[[Name]] Raw field value
[[fmt.Amount__c]] Formatted value (currency, dates, picklist labels, booleans)
[[Account.Name]] Relationship path (add Account.Name to the fields list)
[[number]], [[index]] 1 based / 0 based position
[[count]] Number of records rendered
[[#isFirst]]...[[/isFirst]] Sections: isFirst, isLast, isEven, isOdd, or any truthy field
[[^Field]]...[[/Field]] Inverted section, rendered when the field is empty

Inside tables keep tags in HTML comments, for example <!-- [[#isFirst]] -->, exactly like the page level repeat syntax.

Values are not HTML escaped, so rich text fields render as HTML.

Item click, empty state and paging

Example configuration

{
    "type": "record-repeater",
    "objectName": "Job__c",
    "fields": ["Name", "Location__c", "Salary__c", "Account.Name", "Closing_Date__c"],
    "filter": "Status__c = 'Open'",
    "orderBy": "Closing_Date__c ASC",
    "pageSize": 12,
    "containerClass": "grid grid-cols-1 md:grid-cols-3 gap-4",
    "rowClick": { "type": "page", "page": "Job Detail" }
}

And an item template:

<div class="card bg-base-100 shadow-sm">
    <div class="card-body">
        <h3 class="card-title">[[Name]]</h3>
        <p class="text-sm opacity-70">[[Account.Name]] ยท [[Location__c]]</p>
        <p class="font-semibold">[[fmt.Salary__c]]</p>
        [[#Closing_Date__c]]<span class="badge badge-warning">Closes [[fmt.Closing_Date__c]]</span>[[/Closing_Date__c]]
    </div>
</div>

Relationship to the page level repeat syntax

The page level {{#record.Cases}} sections still exist and are merged on the server. Use the repeater when you want a visual template you can design in the builder, paging, an independent query (any object, not only children of the context record) and item click actions.