Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Creating Dummy record for Conditional Looping › Re: Creating Dummy record for Conditional Looping
Actually I am using a map ,I need to create a record in my destination based on a condition on the input record which is unbounded .So ,I used conditional looping to filter and map records which i need in the output .Now,if i dont have any record in the input matching the condition ,then i need to create a dummy record in the destination with all fields empty values.
Source
<Record>
<field1>NY</field1>
<field2>New York</field2>
</Record>
<Record>
<field1>NY</field1>
<field2>Brooklyn</field2>
</Record>
<Record>
<field1>NJ</field1>
<field2>Trenton</field2>
</Record>
My condition is field1==NY .I need the records with this condition,if any otherwise destination node should be one record with empty values in all fields.
Which is the best way to handle this in a map,using table looping functoid,or some other functoids or writing an inline xslt script ?