BizTalk 2009 - The Scope of the Table Looping Functoid

Posted by StuartBrierley on Geeks with Blogs See other posts from Geeks with Blogs or by StuartBrierley
Published on Tue, 01 Jun 2010 07:24:44 GMT Indexed on 2010/06/01 8:35 UTC
Read the original article Hit count: 778

Filed under:

When mapping in BizTalk you will find there are times when you need to map from flat and dispersed elemements in your source schema to a repeated record with child elements in your destination schema. 

Below is an example of how you can make use of the Table Looping Functoid to bring together these flat elements and create your repeated group.  Although this example is purposely simple, I have previsouly encounted this issue on a much more complex scale when mapping the response from a credit scoring agency where all the applicant details were supplied in separate parts of a very flat schema.

Consider the source and destination schemas as follows:

Source Schema
 

Destination Schema

Although the Table Looping Functoid states that the first input must be a scoping element linked from a repeating group, you can actually also make use of a constant value.  In this case I know that the source schema always contains two people, so I set this to two.

Scoping

Then you need to set the number of columns in your table, in this case 2 (name and sex) and link all the required fields from the source schema.

Properties

Following this you can configure the table.

Configuration

You can then add the Table Extractor functoids and complete the map.

Mapping

If you now validate this map you will see that BizTalk will warn you about the scoping link for the Table Looping Functoid, but this can be safely ignored.

C:\Code\Developer Folders\Stuart Brierley\Test Mapping\TableLooping.btm: warning btm1071: A first input of the Table-Looping functoid must be a link from a Source Tree Node which acts as the scoping parameter.

Testing the map will produce the following output:

Results

© Geeks with Blogs or respective owner