Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Mapping help needed!
- This topic has 3 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
March 13, 2008 at 8:40 AM #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.
-
March 18, 2008 at 7:23 AM #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.
-
March 20, 2008 at 3:43 PM #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]
-
March 20, 2008 at 4:02 PM #19097
Check out your solution at 🙂
http://prashantbaker.blogspot.com/2008/03/supressing-records-while-mapping.html
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.