Action References
ListMapAction
ListMapAction
Purpose
Create a new array by mapping over an existing list with MScript, then store the result in contextPropertyName.
When to use it
- Transform list items before rendering or sending in a response.
- Derive lightweight DTOs from richer objects for downstream actions.
Key fields
| Field | Type | Description |
|---|---|---|
sourceList | MScript | Expression that resolves to the source array. |
itemName | String | Variable name representing each item inside mapScript. |
mapScript | MScript | Returns the mapped item; can reference itemName. |
Example
{
"id": "a320-map-lines",
"name": "mapInvoiceLines",
"contextPropertyName": "invoiceLineDtos",
"sourceList": "this.invoice.lines",
"itemName": "line",
"mapScript": "{ sku: line.sku, qty: line.qty, total: line.qty * line.unitPrice }"
}
Was this page helpful?
Built with Documentation.AI
Last updated Jan 3, 2026