Skip to Content
author's profile photo
Former Member

Graphical Mapping - Disgard empty

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on May 05, 2011 at 04:59 AM

    You can also use the following:

    SourceField -> Exists -> CreateIf -> TargetField

    Regards, Gaurav

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 04, 2011 at 03:54 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 05, 2011 at 04:31 AM

    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 comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 05, 2011 at 05:21 PM

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

    Add comment
    10|10000 characters needed characters exceeded