In a graphical mapping, if the source element contains no data, I would like to not create the element in the destination.
My intention is that if there is an empty XML message being passed (that is that the tags do not contain data) that a message will not be generated thus preventing 'empty' messages from being delivered to the receiver.
use exists and followed by if without else function to map only if the value exist for the mapping.
Quite a common requirement and easy solutions:
1. Standard functions:
FIELD01 -> equalsS: -> not -> createIf -> target
2. UDF:
"a" is the source field..
this udf will suppress the node when the input is null or empty..
if( (a == null) || (a.length == 0) )
{
result.addSuppress();
}
Edited by: Puneet Singhal on May 5, 2011 6:31 AM
Add a comment