On/Off Element in the output message based on input message element content.

March 16, 2005

Lets take a sample condition where you want to map an element from the source schema to target schema if there is a particular value in the element.

Let me make it clear. Let us take a source schema as shown below:

<ns0:PO xmlns:ns0='http://Saravana.Biztalk.Learning.Schemas.BasicPO1'>
<Order>
<OrderNumber>OrderNumb</OrderNumber>
<Status>OKs</Status>
</Order>
</ns0:PO>

if the incoming message has the value of the element "Status" = "OK" then we want the element "Status" to be present in the outgoing message, if the value is something else then we don't need this element in the outgoing message.

Have you ever encountered such a problem? Solution for this problem in 4 easy steps.

1. Create a new map and configure the source and target schema as shown in the below figure.

Drag a Logical Equal functoid and Advanced "Value Mapping" functionoid.

2. Set the Logical Equal functoid Input parameters as shown in below figure

3. Set the Value Mapping functoid Input parameters as shown in below figure

4. Configure and run the solution by creating a Receive port,Receive Location and Send port basic setup (As you guys know!!). and configuring the map in the receive port.

It's that simple.

Author: Saravana Kumar

Saravana Kumar is the Founder and CTO of BizTalk360, an enterprise software that acts as an all-in-one solution for better administration, operation, support and monitoring of Microsoft BizTalk Server environments.

Get full control of your BizTalk Environments

Over 500 customers across 30+ countries depend on BizTalk360

Start your 14 days Free Trial

Back to Top