> For the complete documentation index, see [llms.txt](https://v5docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5docs.keyfax.biz/reference/expression-reference/text-expressions/rowmerge.md).

# RowMerge

Builds a single string from every row of a multi-row databox, by substituting named columns into a pattern and joining the rows with a separator.

Two arguments: the pattern, naming columns in square brackets, and the separator to put between rows.

For a databox holding:

```xml
<KFXmlValue rows="2">
  <KFRow id="0"><userId>1</userId><name>George Smiley</name></KFRow>
  <KFRow id="1"><userId>2</userId><name>Toby Esterhase</name></KFRow>
</KFXmlValue>
```

| Expression                            | Result                                  |
| ------------------------------------- | --------------------------------------- |
| `RowMerge("[name] ([userId])", ", ")` | `George Smiley (1), Toby Esterhase (2)` |

This is the function to reach for when you need a readable list out of a SQL query or an HTTP request — several repairs, several tenancies, several contacts — in one message or one task.

The databox must actually hold rows: `RowMerge` needs a `KFXmlValue` with a `rows` attribute, which is what the multi-record-set option on those databoxes produces.

For the first row only, use [FieldMerge](/reference/expression-reference/text-expressions/fieldmerge.md).
