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
    Posts
    • #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:sequence>
      </xs:complexType>
      – <xs:complexType name=\"ADDRLINEType\" mixed=\"true\">
      <xs:attribute name=\"index\" type=\"xs:string\" use=\"required\" />
      </xs:complexType>[/code:1:fe7a424b97]

      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

      Torben

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

      http://biztalkblogs.com/deepakl

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

        BTS4FUN

    • #49799
      biztalkgurus

        Empire of Lies — Raymond Khoury — 9781250210968

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