Data Mapping – fill a field more than once a time

Home Page Forums BizTalk 2004 – BizTalk 2010 Data Mapping – fill a field more than once a time

Viewing 2 reply threads
  • Author
    Posts
    • #25275

      Hi.

      I’m not sure how it will be called, but I need to fill a field in the schema more than once at one time. That means I have an attribute called @Role and this will be filled with two characters at one time.

      Example:

      … <header>

      …… <Party @Role=’MR’>

      ……… <ID>xxxxx</ID>

      ……</Party>

      …… <Party @Role=’UD’>

      ……… <CodeAG>xxxxxx</CodeAG>

      …… </Party>

      … </header>

      Hopefully I wrote it that you can understand it [;)]

      How can I handle this?

      Thanks in advance

      Wolfgang

    • #25277

      You can use the value mapping functoid, which takes a boolean and a data input. If the boolean is true then the data input is output, otherwise nothing is output.
      Are both Party element above the same, or do you have two different Party elements

      It would be useful if you could explain the source message and how you determine which role to use.

      • #25281

        Hello Greg.

        Thanks for your reply.

        Yes, you’re right. Both Party elements are the same and I want the element as often as I like.

        I have an element called “Party”. This “Party” element has two Attributes, one is called “ID” and one is called “Role”. Now I want to fill these attributes from different source fields in the same map.

        Source field  ————————–> Destination field

        <ID> ————————————> <Party Role=’MR’ ID=’912345′>

        <Number> —————————-> <Party Role=’UD’ ID=’9′>

        At the end I have in the Output-XML several Elements called “Party” with different attribute values.

         

        The destination schema looks like:

        <xs:element minOccurs=0 maxOccurs=unbounded Name=”Party”>

        <xs:attribute name=”ID” type=”xs:string” use=”required”>

        <xs:attribute name=”Role” type=”xs:string” use=”required”>

         

        And the Output as an XML File should looks like this:

        <Party Role=’MR’ ID=’912345′>

        <Party Role=’UD’ ID=’9′>

        <Party Role=’…’ ID=’…’>

        <Party Role=’…’ ID=’…’>

        My question is, how can I handle it in the map? Should I just “draw a line” from the source element to the destination element and everything will be handled by the schema? Or do I have to use special functoids? I don’t no at the moment.

        Thank you very much in advance.

        Wolfgang

        //Edit: I forgot to say the source file has only single records!

    • #50445
      biztalkgurus

        Irresistible Empire: America’s Advance Through Twentieth-Century Europe by Victoria de Grazia · 9780674022348

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