cancel
Showing results for 
Search instead for 
Did you mean: 

How to Avoid fields or sends empty values when source fields are empty

Former Member
0 Kudos

Hello Gurus, Actually we are soon to go live project, but we are encountered some particuliarities:

we need to concat the first name and the middle name, but some users doesn't have middlename, for this reason when i check the xml source i found the following:

User with middlename:

<firstname>Jhon</firstname>

<Middlename>Andres</middlename>

concat function result= Jhon Andres

User Without middlename

<firstname>Andrew</firstname>

concat function= null or empty

the reason it's because this user doesn't have middlename and the xml or query not extracts this fields (first name + null= null), how can i do to verify if exists the middlename or force to send an empty value

so that the function does not return empty or null

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Juan,
I'v already have a similar requirement. This should solve your problem too.

In the mapping map Middlename to the exists function (like I did with the DisplayName) followed by an if, map the true value with the Middlename tag and the false value with an empty constant as the screenshot bellow.

Finally, map the output of the if to the second input of your concat function.

Best regards.
Mohamed Amine.

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Juan,

Use map with default after middle name then it should work.

Regards,

Sriprasad Shivaram Bhat