none
BizTalk 2010 map question... 810 EDI is creating empty N2, N3 and N4 segments RRS feed

  • Question

  • We have our internal Invoice xml schema and an EDI 810 schema. I have created a map in BizTalk 2010 to convert the Invoice to the EDI 810 document. When my 810 is created, it is creating empty N2, N3 and N4 segments when there is no data in my xml document.

    Here is a see a screenshot of the BizTalk map I created dealing with the N1, N2, N3 and N4 segments


    Below is the Contacts chunk from my input xml file. You will see I have 3 Contact nodes. The first only has a Name node. The next two each has a Name, AdditionalName, Address and CityStateZip nodes. What I want is the 810 that gets generated to only have an N1 segment for the first Contact node and then a N1, N2, N3 and N4 segments for the other two Contact nodes. Instead, all of them have N1, N2, N3 and N4 segments (see below). The vendor we are sending our 810's to says it is failing in their system because of the blank N2, N3 and N4 segments.

    Xml chunk...

      <Contacts>
        <Contact>
          <Name>
            <Code>ST</Code>
            <IdentificationCodeQualifier>UL</IdentificationCodeQualifier>
            <IdentificationCode>9999999999999</IdentificationCode>
          </Name>
        </Contact>
        <Contact>
          <Name>
            <Code>RI</Code>
            <IdentificationCodeQualifier />
            <IdentificationCode />
          </Name>
          <AdditionalName>
            <Name>Company Name</Name>
          </AdditionalName>
          <Address>
            <Address>Box 123456</Address>
          </Address>
          <CityStateZip>
            <City>Milwaukee</City>
            <State>WI</State>
            <Zip>53288-0079</Zip>
          </CityStateZip>
        </Contact>
        <Contact>
          <Name>
            <Code>BT</Code>
            <IdentificationCodeQualifier />
            <IdentificationCode />
          </Name>
          <AdditionalName>
            <Name>Client Name</Name>
            <Name2>Accounts Payable</Name2>
          </AdditionalName>
          <Address>
            <Address>123 Main Street</Address>
          </Address>
          <CityStateZip>
            <City>Rochester</City>
            <State>MN</State>
            <Zip>55905</Zip>
          </CityStateZip>
        </Contact>
      </Contacts>
    

    This is a chunk of the 810 that is currently getting generated...

    N1*ST**UL*9999999999999~
    N2~       <-- I want it to NOT generate this blank N2
    N3~       <-- I want it to NOT generate this blank N3
    N4~       <-- I want it to NOT generate this blank N4
    N1*RI~
    N2*Company Name~
    N3*Box 123456~
    N4*Milwaukee*WI*53288-0079~
    N1*BT~
    N2*Client Name*Accounts Payable~
    N3*123 Main Street~
    N4*Rochester*MN*55905~

    How can I fix the map (or schema) so it will not generate those N2, N3 and N4 segments for the first Contact node???

    Jeff

    Wednesday, July 25, 2012 10:03 PM

Answers

  • Use logical string functoid or logical existence functoid...give first element of a Node as a input and ouput of functoid to N2 root node ...repeat this for N3 and N4 ..
    • Marked as answer by AKA SIR Thursday, July 26, 2012 3:45 PM
    Thursday, July 26, 2012 12:12 PM

All replies

  • Use logical string functoid or logical existence functoid...give first element of a Node as a input and ouput of functoid to N2 root node ...repeat this for N3 and N4 ..
    • Marked as answer by AKA SIR Thursday, July 26, 2012 3:45 PM
    Thursday, July 26, 2012 12:12 PM
  • Use logical string functoid or logical existence functoid...give first element of a Node as a input and ouput of functoid to N2 root node ...repeat this for N3 and N4 ..

    The logical existence functoid worked perfectly. Thanks!
    Thursday, July 26, 2012 3:45 PM