Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

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

    You can also use the following:

    SourceField -> Exists -> CreateIf -> TargetField

    Regards, Gaurav

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

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.