This topic has not yet been rated - Rate this topic

Loop Operations

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Loop Map Operations

There are two Loop Map Operations: ForEach Loop and MapEach Loop:

 

Map Operator Description Parameters Output

ForEach Loop

Loops over a repeating record in the source document. Relationships defined within the ForEach Loop are evaluated at each iteration of the loop. There is no record in the target document.

ForEach is typically used to flatten a source loop hierarchy. It cannot output a record.

Requires one input parameter and one optional parameter:

 

Source

Required. A repeating record in the source document.

Condition

Optional. Will act as a filter for the records to be iterated.

None

MapEach Loop

Loops over a repeating record in the source document. Relationships defined within the MapEach Loop Map Operation are evaluated at each iteration of the loop. Each iteration of the loop will also produce an instance of the repeating record in the target document.

Requires one input parameter and one optional parameter:

 

Source

Required. A repeating record in the source document.

Condition

Optional. Will act as a filter for the records to be iterated.

A record will be created in the target document.

Loop Map Operations provide the following benefits:

  • When an input message contains repeating elements, a Loop Map Operation can be used to flatten the hierarchy in the output document.

  • When the goal is to perform data manipulation, like concatenating fields or applying a mathematical formula, a Loop Map Operation can use an expression and output the results.

  • A Loop Map Operation can filter an input document based on criteria and output the filtered data.

Scope

When a ForEach Loop or a MapEach Loop is added to the Transform Designer surface, Scope is created as indicated by the arrow Pinned Scope. By default, scope is set when a ForEach Loop or MapEach loop is added. To work in the parent scope, select the arrow to unset the scope Unpinned Scope. To work within the scope of a Loop Map Operation, select the arrow to set scope Pinned Scope. When the scope is set, all items added to the Transform Designer surface will perform under the scope of that Loop Map Operation.

For details on working within the scope of a Loop Map Operation, refer to Working Within the Scope.

Examples

In This Section

See Also

© 2011 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter