Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Mapping help needed please..
- This topic has 9 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
March 27, 2008 at 10:22 AM #19154
Hi
I have a node in my inbound map that is optional, within my map I need to put a value in the outbound node.. either what is in the inbound message (where it exists) or default something in..
Any ideas?
Thanks..
-
March 27, 2008 at 12:39 PM #19155
You need to use ‘Logical Existence’ functoid. I posted the solution at http://prashantbaker.blogspot.com/2008/03/detect-non-existent-nodes-in-source.html
-
March 27, 2008 at 1:57 PM #19160
Thanks, How do you get around that the equals only has one input? I can get it to work where it picks up the node value where present but, it doesn’t put the default value in when there is no node.. where am I going wrong?
Thanks for your help
-
March 27, 2008 at 2:57 PM #19163
I have a similar issue I am trying to resolve. The example did work for me. The image on the post was not clear so Idb33 might not be using the write functoids. I used an existence, a Logical NOT, and two Value Mapping functoids.
Can someone think of another approach as I have very large schema definitions?
-
-
-
March 28, 2008 at 1:35 AM #19171
This approach might not work, but have you tried setting the default value on the output node of the map and including the link from the optional source element. This would mean that if the optional element doesn’t exist, the default value will be used instead.
Although I haven’t tried it, it should work……
When I get into work today I will have a look for the output element property on the map.
Cheers, Nick.
-
March 28, 2008 at 2:34 AM #19173
Hi Nick,
Thanks for that, but it doesn’t work.. It allows you to put a default value into the output node but when I test the map the node is empty.
I have just tried what Jeff posted with the logical NOT and that does work through the test map, but won’t let me build it as my output node has two inputs…
Thanks.
-
March 28, 2008 at 9:08 AM #19179
I have a couple of output schemas that fit this requirement, and although it may not be the most elegant, Biztalk offers the path so I took it.
In my schemas, I simply set the ‘Default Value’ to whatever value I wanted the output to have in the node in case I don’t have anything to put into it.
Just my pair ‘o’ pennies.
-Rich
-
-
-
March 28, 2008 at 9:46 AM #19181
Luke,
Saravana Kumar has answered the problem in this newsgroup entry. If you need me to elaborate (blog entry me thinks!) let me know as it took me five minutes to get my head around his explanation.
Cheers, Nick.
-
March 28, 2008 at 10:31 AM #19182
This might work, but I cant test it at the moment: use the custom scripting functoid, give it two inputs, the first being a node that you know will always be there, the second being the optional node, in the script ignore the first input (it’s just to make sure the functoid is executed) and check if the second is null. Do what you need on null, and not null.
John D.
-
March 28, 2008 at 11:19 AM #19183
The example I showed in my blog works. I updated the post to explain it in more detail. Please revisit it.
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.