Mapping and sometimes looping

Home Page Forums BizTalk 2004 – BizTalk 2010 Mapping and sometimes looping

  • This topic has 3 replies, 1 voice, and was last updated 3 years ago by biztalkgurus.
Viewing 2 reply threads
  • Author
    • #12067

      Hi there,

      I’m having this problem with my map. The source file sometimes have a loop and how to handle this?

      [b:fe7a424b97]Source schema[/b:fe7a424b97]:
      [code:1:fe7a424b97]xs:complexType name=\"ADDRESSType\">
      – <xs:sequence>
      <xs:element name=\"ADDRLINE\" type=\"ADDRLINEType\" />
      <xs:element minOccurs=\"0\" ref=\"CITY\" />
      <xs:element minOccurs=\"0\" ref=\"POSTALCODE\" />
      – <xs:complexType name=\"ADDRLINEType\" mixed=\"true\">
      <xs:attribute name=\"index\" type=\"xs:string\" use=\"required\" />

      The problem is that sometime the ADDRLINE loops with index 1-3 but the distination schema only contain one element to store the data. I’m only interested in the first line (index). Any advise on how to solve this?

      Best regards


    • #12068

      You can use the \”Index\” functiod from the \”Advanced functiods\” to take the desired instance (In your case the index would be \”1\”) and map it.

      • #12069

        Thanks for the reply. The index didn’t solve it, so I tried the iteration insted and it solved it. The problem with index was that the index value only was set to zero the first time the ADDRLINE was hit. The iteration and a logical functoids=1 on the top node ind the distination schema did it.

        Best regrads


    • #49799

        Empire of Lies — Raymond Khoury — 9781250210968

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