Set value of xs:boolean field in BizTalk Map manually.

In case you want to set a constant true or false value to a field of type xs:boolean in a BizTalk Map you maybe run in trouble with the default behavior of the BizTalk Map designer.
You can not assign a constant value by using a String Concatenation Functoid because it is another data type and a cast is not done automatically.
Furthermore the BizTalk Map Designer deals incoming true or false values of type bool regularly as indicator that a node will exist in the target document or not.

So the easiest way is clearly the following:

  1. Create a Scripting Functoid in your map, leave the input empty and assign the output to your field of type xs:boolean.





2. Open the properties of the Functoid, go to the “Script Functoid Configuration” tab.

3. Select “Inline C#” as type from the list.

4. Place the following code in the script box.
(in case you want false as value change the code as necessary)

public bool ReturnAlwaysTrue()
   return true;














5. You’re done.

Leave a Reply