cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping help for "exists" function

Former Member
0 Kudos

Hi All,

I need a help for one of mapping function "exists" usage:

When source filed <F1> value doesn't exists in source payload then drop <target_segment1 0: 999999>.

It means <F1> value not coming with source, then I do not want display entire <target_segment1> in receiver side.

my logic should be like this , can you help me to what functions for implement this :

If ( <F1> -


>exists) then <F1> map into <target_segment1> else drop the <target_segment1>

Note: under <target_segment1> there are multiple fields: so when <F1> value not coming with source, so total segment and under fields not display in receiver side.

Thanks,

Ravi Shankar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

its simple.

use if with exist and map it to header node. if source does not exist the header and all the fields under it will not be sent.

Thanks

Inder

Former Member
0 Kudos

<<use if with exist and map it to header node. if source does not exist the header and all the fields under it will not be sent.>>

It seems to simple, I tried as it is with map header node , but it is not dropping header node, that's what i posted this question:

for example source file :

<L>

L11,, 2345

L12,2345, 3456

L13, 8976,4567

</L>

In above L11_01 = "" (---> null)

L12_01 = "2345"

L13_01 = "8976"

I tried like this for header node::

If <L11 01> -->exists then <L1101> map into <L> ;

In this case <L11_01> value doesn't exists, so I need to drop the entire row . Out put required like this:

L12,2345, 3456

L13, 8976,4567

But out put coming like this(as it is same like source) :

L11,, 2345

L12,2345, 3456

L13, 8976,4567

Any idea now:

Thanks,

Shankar-

Former Member
0 Kudos

use createif function also after exists.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Maybe it is passing a blank value e.g </FIELD01> but the field would still technically exists. You could try using this mapping


FIELD01 -> equalsS: -> not -> createIf -> target

Regards,

Mark

Former Member
0 Kudos

thanks mark..its worked.

Answers (2)

Answers (2)

Former Member
0 Kudos

Shankar,

You can follow the following approach:

Source field -


> not-->equalsS blank->Ifwithoutelse--->createif>Target

Source field -


> then-->

Former Member
0 Kudos

Use exits and createif functions

F1Node --> exits ---> createif ---> Targetnode