Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Advanced mapping problem
- This topic has 2 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
October 21, 2009 at 3:15 AM #23492
Dear Collegs,
I have one issue and hope that you can help me. Namely, I have a problem with advanced mapping between two schemas.
This are two schemas between which I must good mapping make.
The problem is in HeaderNotes. Namely, I want mapping which works on this princips :
1. If field ExtraNotesHeader1 has a some value than in destination schema in HeaderNotes\Desctiption transfer that value and the value in ID field automaticly set to ENH1
2. If field ExtraNotesHeader2 has a some value than in destination schema in HeaderNotes\Desctiption transfer that value and the value in ID field automaticly set to ENH2
3. If field ExtraNotesHeader3 has a some value than in destination schema in HeaderNotes\Desctiption transfer that value and the value in ID field automaticly set to ENH3
4. If all fields are empty than do not create anything in HeaderNotes.SOURCHE SCHEMA
<Orders> <Order> <OrderNumber>
<Customer Number>
<ShipDate>
<DeliveryDate>
<Adress>
<ZipCode>
<Town>
<ItemNo>
<Quantity>
<Amount>
<Status>
<ShipmentMethod>
<PaymentMethod>
<ExtraHeaderNotes1>
<ExtraHeaderNotes2>
<ExtraHeaderNotes3>DESTINATION SCHEMA
<Order>
<OrderHeader>
<Customer>
<ShipDate>
<DeliveryDate>
<Adress>
<ZipCode>
<Town>
<Status>
<OrderLine>
<LineNumber>
<ItemNo>
<Amount>
<Quantity>
<HeaderNotes>
<ID>
<Desctiption>
THANKS IN ADVANCE
-
October 21, 2009 at 8:31 AM #23494
I think you are going to have to either make use of some complex mapping, using lots of functoids, or make use of a scripting functoid to achieve this.
Assumming all the ExtraHeaderNotes elements are present even when empty, you should be able to make use of some logical String funtoids to check the value of each element and then use the output from these, in conjunction with a few Equals functoids, some AND functoids and some Value Mapping functoids to control which of the values gets mapped.
e.g.
If (ExtraHeaderNotes1 is string) and (ExtraheaderNotes2 is not string) and (ExtraheaderNotes3 is not string) map ExtraHeaderNotes1
If (ExtraHeaderNotes2 is string) and (ExtraheaderNotes3 is not string) map ExtraHeaderNotes2
If (ExtraheaderNotes3 is string) map ExtraheaderNotes3
Not that easy to explain in text but I hope you get the idea!
-
October 22, 2009 at 3:00 AM #23498
Thanks on this answer,
Acctually I already found the solution for this problem.
I did that with Logical String functionid.
Regards,
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.