Geeks With Blogs

News
Stuart Brierley Integration Management - BizTalk and More

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

Posted on Tuesday, June 1, 2010 9:24 AM BizTalk Maps, Mapping and Functoids | Back to top


Comments on this post: BizTalk 2009 - The Scope of the Table Looping Functoid

# re: BizTalk 2009 - The Scope of the Table Looping Functoid
Requesting Gravatar...
hi,

can u please tell me how to avoid the warning which occur while validate the table looping used mapping
Left by AboorvaRaja on Jun 02, 2010 6:53 AM

# re: BizTalk 2009 - The Scope of the Table Looping Functoid
Requesting Gravatar...
Hi,

Assuming that you mean the "A first input of the Table-Looping functoid must be a link from a Source Tree Node which acts as the scoping parameter" warning, then as far as I am aware there is no way to stop this warning.

The Table Looping Functoid is documented as accepting a repeating element/record as the first input to scope the table. As detailed in my post you can use a numerical value instead of a repeating element/record but in this case you will get the warning detailed above.

This does not cause any errors with the map; it will still compile, deploy and run successfully. It is simply a warning that you haven't scoped the functoid in the documented manner.

If you were referring to a different warning please post this so we can see what problem you are having.

Thanks
Stu.
Left by Stuart Brierley on Jun 02, 2010 8:44 AM

# re: BizTalk 2009 - The Scope of the Table Looping Functoid
Requesting Gravatar...
Thank you
Left by Tony on Jun 28, 2011 5:44 AM

# re: BizTalk 2009 - The Scope of the Table Looping Functoid
Requesting Gravatar...
How do I group elements that have similar item codes:
<ns0:Invoice xmlns:ns0="http://BizTalk_Server_Application_XML3.InBound_v_1.0.0">
<ns0:LineHeader>
<ns0:ContractorID>1</ns0:ContractorID>
<ns0:InvoiceDate>1999-05-31</ns0:InvoiceDate>
<ns0:GSTCode>AUS</ns0:GSTCode>
</ns0:LineHeader>
<ns0:LineItems>
<ns0:LineItem>
<ns0:ItemID>1</ns0:ItemID>
<ns0:Qty>7</ns0:Qty>
</ns0:LineItem>
<ns0:LineItem>
<ns0:ItemID>1</ns0:ItemID>
<ns0:Qty>3</ns0:Qty>
</ns0:LineItem>
<ns0:LineItem>
<ns0:ItemID>1</ns0:ItemID>
<ns0:Qty>0</ns0:Qty>
</ns0:LineItem>
<ns0:LineItem>
<ns0:ItemID>2</ns0:ItemID>
<ns0:Qty>20</ns0:Qty>
</ns0:LineItem>
</ns0:LineItems>
</ns0:Invoice>
Left by Raj on Mar 21, 2013 1:03 PM

Your comment:
 (will show your gravatar)
 


Copyright © Stuart Brierley | Powered by: GeeksWithBlogs.net | Join free