To map a repeating source element to a non-repeating target element,
drag elements between the
Message Mapping editor Source
and Target panes. The following items appear in the Spreadsheet pane:
- A ‘for’ row with Value set to the repeating source element.
- An ‘if’ row.
- A ‘condition’ row with Value set to msgmap:occurrence($source/…)
= 1.
- A row with Map Script set to the target field and Value set to the source
field.
The first occurrence of the source field is mapped to the target field.
The ‘for’ row specifies that a loop is to be iterated for the specified repeating
element. The ‘if’ and ‘condition’ rows restrict the logic to a single occurrence
of the repeating element (see Configuring conditional mappings for more
information on conditional logic in a mapping node).