Action ReferencesListMapAction
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

FieldTypeDescription
sourceListMScriptExpression that resolves to the source array.
itemNameStringVariable name representing each item inside mapScript.
mapScriptMScriptReturns 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