none
Biztalk map : How to sort the destination schema loop in a custom order

    Question

  • Hi,

    I am working on a 810 map and one of our customer insisting on the order of the N1Loop values.

    They want the loop to be sorted by the N101 value and the order is BY, SU, ST, II.
    But my source schema comes in a different order.

    Example :

    Source :
    - <Addresses>

    - <Address>
      <Address_Type>RS</Address_Type>
      <Address_Number />
      <Duns_Code>2001312739</Duns_Code>
      <Name>Company</Name>
      <Street1>Street</Street1>
      <City>City</City>
      <State_Province>ST</State_Province>
      <Postal_Code>12345</Postal_Code>
      <Country>US</Country>
      </Address>
    - <Address>
      <Address_Type>AG</Address_Type>
      <Address_Number>2001543778</Address_Number>
      <Duns_Code />
      <Name>Customer</Name>
      <Street1>Street</Street1>
      <City>City</City>
      <State_Province>ST</State_Province>
      <Postal_Code>12345</Postal_Code>
      <Country>US</Country>
      </Address>
    ..
    ..
    ..
    ..
      </Addresses>


    Destination:

    - <ns0:N1Loop1>
    - <ns0:N1>
      <N101>II</N101>
      <N102>Company</N102>
      <N103>92</N103>
      <N104>CODE</N104>
      </ns0:N1>
    - <ns0:N3>
      <N301>Street</N301>
      </ns0:N3>
    - <ns0:N4>
      <N401>City</N401>
      <N402>ST</N402>
      <N403>12345</N403>
      <N404>US</N404>
      </ns0:N4>
      </ns0:N1Loop1>
    - <ns0:N1Loop1>
    - <ns0:N1>
      <N101>BY</N101>
      <N102>Customer</N102>
      </ns0:N1>
    - <ns0:N3>
      <N301>Street</N301>
      </ns0:N3>
    - <ns0:N4>
      <N401>City</N401>
      <N402>ST</N402>
      <N403>12345</N403>
      <N404>US</N404>
      </ns0:N4>
      </ns0:N1Loop1>
    ..
    ..
    ..
    ..




    How can I sort the destination loop by the above custom values?

    Thank you!

    The Developer
    Monday, November 30, 2009 8:49 PM

Answers

  • Well, I think this is possible using XSLT mapping.

    Now I have to brushup my knowledge in XSLT.

    Venkata
    • Marked as answer by VenkataB Thursday, December 03, 2009 10:38 PM
    Thursday, December 03, 2009 10:37 PM

All replies