1

I'm using a scripting functoid in a BizTalk map. In a certain case, I want the destination element to be skipped (rather than empty).

I'm using inline C#. When I return null, the destination element is empty. Is there a way to make it skipped altogether?

2 Answers 2

4

Use a LogicalEquals functoid to determine if your input matches your case. Then map that output to a LogicalNot. Send the output of the LogicalEquals to one Mapping functoid (second input for Mapping will be the value of your field) and the output of your LogicalNot to another (same second input). Then map both of the value mapping functoids to your destination node.

Then, when your value equals your case, you'll send FALSE to the destination (instead of Null or Empty) and the node won't be output. Any other time, the LogicalNot will fire its Mapping Functoid and you should get your desired output.

1
  • So, the value mapping functoid seems to be the key. Thanks! Commented Mar 25, 2010 at 19:47
0

Here's how I resolved it: (Please post an answer if you have a better way.)

Split the scripting functoid into two. The first one determines whether the destination element should exist at all and returns a boolean. The second one determines what value should be set in the destination (if any). Use these two scripting functoids as the inputs to a value mapping functoid.

Update: I didn't see Allen's similar answer when I posted this. I'll leave my alternative approach here in case it helps someone.

Not the answer you're looking for? Browse other questions tagged or ask your own question.