Mapping help needed!

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Mapping help needed!

Viewing 2 reply threads
  • Author
    Posts
    • #19064

      Hi, I have the following XML and I need to pick out certain of the REFCODE nodes depending on what the REFDESC is. I have tried equal and value mapping functions, but I need more than one to be mapped to the same destination record and it won’t build as the record can only have one input. I have tried doing inline XSLT via the scripting functiod, but with no luck. I would be gratful for any help!! as I’m pulling my hair out!

       <?xml version=”1.0″ encoding=”ISO-8859-1″?>
      <E-COMMERCE_MESSAGE>
      <biztalk_1>
      <header>
      <delivery>
      <message>
      <messageID>ORDERS</messageID>
      <sent>2008-03-11T08:38:39</sent>
      <subject>Purchase Order</subject>
      </message>
      </delivery>
      <manifest>
      <document>
      <name>PO</name>
      <description>Purchase Order</description>
      </document>
      </manifest>
      </header>
      <body>
      <ORDER>
      <ORDERHEAD ORDERTYPE=”Stock Order” FUNCCODE=”FIO”>
      <ORDERDESC>Purchase Order</ORDERDESC>
      <FUNCDESC>Firm Order</FUNCDESC>
      <CURRENCY CURRTYPE=”ORD” CURRCODE=”GBP”>
      <CURRTYPEDESC>Order Currency</CURRTYPEDESC>
      </CURRENCY>
      </ORDERHEAD>
      <DATEINFO DATETYPE=”ORD”>
      <DATEDESC>Purchase Order Date</DATEDESC>
      <DATE>2008-03-11T00:00:00</DATE>
      </DATEINFO>
      <REFERENCE REFTYPE=”USR”>
      <REFDESC>Warehouse</REFDESC>
      <REFCODE>30</REFCODE>
      </REFERENCE>
      <REFERENCE REFTYPE=”CUR”>
      <REFDESC>Customer’s Purchase Order Number</REFDESC>
      <REFCODE>999999</REFCODE>
      </REFERENCE>
      <REFERENCE REFTYPE=”USR”>
      <REFDESC>Re-Buyers Name</REFDESC>
      <REFCODE>Mr Smith</REFCODE>
      </REFERENCE>
      <REFERENCE REFTYPE=”USR”>
      <REFDESC>Particular Order Type</REFDESC>
      <REFCODE>STOCK</REFCODE>
      </REFERENCE>
      </ORDER>
      </body>
      </biztalk_1>
      </E-COMMERCE_MESSAGE>

      Thanks in advance.

    • #19084

       Have you tried using multiple equals functiods, then “or” them together and utilize the value mapping functoid off of that.  That works you around your single input issue.   

    • #19096

      If you set a boolean value of false to the iterating record, the mapper would not create that particular record.  lets say you only need for RefType=’USR’.  Add a logical = functoid and provide it with two inputs: Reftype node and a constant value ‘USR’.  Map the output to Reference node.  In the output only Reference nodes of type ‘USR’ would be created.   I hope that should solve your problem.

      If you need any other help ping me at [email protected]

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