Advanced mapping problem

Home Page Forums BizTalk 2004 – BizTalk 2010 Advanced mapping problem

Viewing 1 reply thread
  • Author
    Posts
    • #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

    • #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!

      • #23498

        Thanks on this answer,

         

        Acctually I already found the solution for this problem.

        I did that with Logical String functionid.

         

        Regards,

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.