cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical Mapping - Disgard empty

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can also use the following:

SourceField -> Exists -> CreateIf -> TargetField

Regards, Gaurav

Answers (3)

Answers (3)

Former Member
0 Kudos

These will stop an individual object, I want to stop the entire message cold.

Former Member
0 Kudos

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

baskar_gopalakrishnan2
Active Contributor
0 Kudos

use exists and followed by if without else function to map only if the value exist for the mapping.