Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Construct Message
- This topic has 5 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
January 17, 2007 at 1:36 AM #17255Requirement isi have a flat file input message which needs to be converted to xml message. In the orchestration i have to check for some field in flat file message and if it blank then i should not populate the corresponding element in output xml message. Please note i want to suppress the element itself from the output message instead of data. How to do this?Appreciate your help.
-
January 17, 2007 at 2:18 AM #17256
Anon,
one quick way is to create a map. In the map, *do not map* the element you dont want if it is empty (use the conditional mapping functoid).
I don't see what this has to do with the flat file input by the way – in the orchestration you are treating an XML message.
John D.
-
January 17, 2007 at 2:20 AM #17257
You will need to make the output element optional if you want to avoid validation errors about the missing element.
John D.
-
January 17, 2007 at 3:53 AM #17261Are you referring to "not equal" functoid under logical functoids? Where to check for conditional mapping functoid?
-
January 18, 2007 at 1:05 AM #17282
AnonAreYouReallyAnon,
did you try Googling for "BizTalk conditional mapping functoid"? Here's a good like for you:
http://www.topxml.com/BizTalk-Functoids/re-21366_Mapping–Conditional-Output.aspx
The second part treats exactly your question.
John D.
-
-
-
January 18, 2007 at 5:51 AM #17295
You can use a not equal (<>) functoid, and a value mapping functoid.
- Drag a line from the source element or attribute to the <> functoid.
- Create a constant in this functoid, but leave it blank.
- Drag a line from there to the value mapping functoid, as it needs to use the logical as its first connection.
- Now connect the same source element or attribute to the value mapper.
- Then from there to the output schema element.
- (And be sure the output element is nilable/optional.)
Have you tried this? Let me know if it doesn't work as expected and we can check a few properties.
This does assume you have 2 schemas. There are other ways to accomplish this, but this, I believe, makes the most sense.
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.