cancel
Showing results for 
Search instead for 
Did you mean: 

concatenate employee names

Jhonatan
Explorer
0 Kudos
118

Good morning community, do any of you know how I can concatenate fields that only have information? example;

First Last Name
Velez

Second Last Name
Torres

First Name
Santiago

Middle Name
Null

Third Name
Null

Currently we have this formula:

CONCAT([Person#Personal info#FirstName] , CONCAT(" " ,CONCAT([Person#Personal info#SecondName] , CONCAT(" " ,CONCAT(" " ,CONCAT([Person#Personal info#FirstName] , CONCAT(" " ,CONCAT([Person#Personal info#SecondName] , CONCAT(" " ,CONCAT([Person#Personal info#ThirdName] ," " ) ))))) )) )) ))

But when filtering some names are wrong because they only have certain fields. I would appreciate your answer on how to ignore the empty fields.

Accepted Solutions (0)

Answers (1)

Answers (1)

jasonkeene
Discoverer
0 Kudos

You will have to test for Null for each of the fields before concatenating with a space (assuming the unwanted fields are Null).

Not using the exact syntax for clarity of concept;

If(isnull(FirstName), "", Concat(" ", FirstName))

This basically says, if FirstName is null then return an empty string, otherwise concatenate a "space" with the FirstName.