Skip to Content
0

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

Dec 19, 2017 at 08:15 PM

48

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sriprasad Shivaram Bhat
Dec 20, 2017 at 02:55 AM
0

Hello Juan,

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

Regards,

Sriprasad Shivaram Bhat

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 24, 2017 at 12:42 PM
0

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.


exists.png (21.8 kB)
Share
10 |10000 characters needed characters left characters exceeded