locked
Map 1 attribute to multiple elements RRS feed

  • Question

  • Hi,

    We have a good working mapping which uses a table table looping and a table extractor functoid to place 8 different elements into 2 attribute fields.
    But now i get an message back from a third party and we have to create a new mapping to translate the incoming XML to a different format.

    So we have the XML which has the 2 attribute fields and i want to map that to 8 different element fields again. Which functoids do i have to use for this operation?

    Monday, November 5, 2012 3:07 PM

Answers

  • Use Equal Fun , and Value Map Functoid


    Tuesday, November 6, 2012 8:24 AM
  • Hi,

    Use a value mapping functoid to map the value to the destination when the name is = valuestockOwner and so on..

    Or u can go with XSLT.

    Choice is urs..


    Regards
    Ritu Raj
    When you see answers and helpful posts,
    please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Tuesday, November 6, 2012 9:15 AM
    Answerer

All replies

  • Please, give us an example with source and target Xml.

    Leonid Ganeline [BizTalk MVP] BizTalkien: Advanced Questions

    Monday, November 5, 2012 7:56 PM
    Moderator
  • <attributeValue> 
          <name>barcode</name> 
          <value>NONE</value> 
    </attributeValue> 
    <attributeValue> 
          <name>lotCode</name>
          <value>13</value>
    </attributeValue>
    <attributeValue> 
          <name>stockOwner</name>
          <value>05</value>
    </attributeValue>
    <attributeValue>
         <name>stockStatus</name>
         <value>V</value>
    </attributeValue>
    <attributeValue>
         <name>warehouse</name>
         <value>VRO</value>
    </attributeValue>

    Up here we have the incoming XML example, the XSD has 2 attribute fields: name and value. As you can see above there are 5 different name and 5 different value fields.

    And want a few of those values in my outgoing XML in the next fields:

    <valuestockOwner>
    <valuelotCode>
    <valuewarehouse>
    <valuestockStatus>

     Do you need more information or is this sufficient?

    Tuesday, November 6, 2012 7:46 AM
  • Use Equal Fun , and Value Map Functoid


    Tuesday, November 6, 2012 8:24 AM
  • Hi,

    Use a value mapping functoid to map the value to the destination when the name is = valuestockOwner and so on..

    Or u can go with XSLT.

    Choice is urs..


    Regards
    Ritu Raj
    When you see answers and helpful posts,
    please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Tuesday, November 6, 2012 9:15 AM
    Answerer
  • Hi,

    Thanks for the answers, it didnt work with a Value mapping functoid. But it did work with a Value Mapping (Flattening).

    Tuesday, November 6, 2012 10:22 AM