Skip to content

Repeat — Reference

Reference · Advanced · Server Connect

Execute nested server steps once for each record and collect per-iteration outputs.

Execute nested server steps once for each record and collect per-iteration outputs.

  • An open Server Connect action. Runtime differences below refer to the installed Node.js and PHP implementations.

Execute nested server steps once for each record and collect per-iteration outputs.

Setting Meaning
NameNames the array of results from the repeat. For example, processed is available to later server steps.
ExpressionThe collection to iterate. Prefer an array of records for portable behavior. This is a server-side loop, separate from a page-side repeat that renders HTML.
OutputIncludes the repeat’s result array in the action response. Inner steps control which calculated values appear within each item.
Output FilterControls copying original record fields to each output item: Include copies only the selected fields; Exclude copies fields except the selected ones.
Output FieldsThe original record fields to include or exclude. With Include and no fields selected, no original record fields are copied automatically; nested output steps can still add values.
ExecThe steps to run for each item. The current record’s fields are in scope, along with $value, $key, $index (zero-based), $number (one-based) and $oddeven.

Repeat a products array containing {id:1,name:“Notebook”} and {id:2,name:“Pencil”}. Select Include and the name output field. Name the repeat processed and enable Output. With no extra calculated outputs, the result should contain processed = [{“name”:“Notebook”},{“name”:“Pencil”}].

Do not pass a comma-separated string as a portable substitute for an array: Node.js splits strings on commas, while PHP splits them into characters. Use an explicit array. Break exits the current loop; the iteration already started may contribute its output.

Use the Server Connect guides when you need the surrounding project, data-loading or form procedure.

You can configure Repeat deliberately and verify the result and failure behavior described in this reference.