I have a problem using the logical existance functoid and the equal functoid on the same source element to filter the outdata. My record look like this. The Address and City are optional and the Shipto is Mandatory. If there is no Address or if the City = 1 I want to map the Order to the destination schema. If the city is something else then 1 don’t want to map the order at all. The document can contain many orders.
<Order>
<Shipto>
<Address>
<City>1</City>
</Address>
</Shipto>
<OrderNumber>123</OrderNumber>
</Order>
When I use the logical existence + Not functoids on Address and the equal functoid on City no orders will map. I checked the xslt and it looks like the for-each statement is on the Address level and if it doesn’t exist it fails.
I struggled similariy with Exists functoid. It only give true if the node actually exists, when the node doesn’t exist, it doesn’t return anything. Strange phenomenon.
I’d suggest you use a counter (index) functoid or a cumulative functoid to implement your functionality.
With cumulative string functoid, you can get the values of city, do a search for 1 in the output of the cumulative functoid and map accordingly.
Look up my bio on BizTalkGurus and under “My Files” section, there is an image named “mapsample.png”, click on it and see if this example of a BizTalk map can accomplish what you are looking for…
Daniel.
Author
Posts
Viewing 2 reply threads
The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.