cancel
Showing results for 
Search instead for 
Did you mean: 

null value in mapping

Former Member
0 Kudos

Hello,

my inbound message is:

...

<FIELD1>39</FIELD1>

<FIELD2 />

<FIELD3>56</FIELD3>

...

i want mapping FIELD2 always. In this case, the value come is NULL, i need mapping to target node with blank value

i try with mappingWithDefault but don't work

thank very much

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

you use mapWithDefault when a particular field does not come in the source message then you want to map some default value (which you specify in the function properties)to the target field.

But I think in your case a Field2 is present in the source message with no value and Whenver there is no value in Field2 you want to pass balnk space to the target field then Do the mapping as shown below

 
                    Constant[   ]--->then
Field2------>equalS-------------------->if------------------->TargetField
constant[]/

Thanks and Regards,

Kubra fatima

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi

When there is no value for File2 in source side,the element going to present in source data or not.

if its going to present then use if condition to check the value of filed3,using contsnat function without value,that means Filed2 value is blank then pass constant value to File2 else pass the value as per your requirement.

Raj

Former Member
0 Kudos

Hi Silvia,

Try with 'If' condition.

In IF condition:

First compare Field2 against null value(i.e. a constant without any value), if the valeu is 'True' then pass a constant with one blank space , otherwise pass 'Field2' as it is.

Regards,

Supriya.