Formula to display first name and two last names
|Knowledge Article Number||000188477|
Administrator wants to create a formula that will select the first name and the two last names and input them in a box (Limited to only 27 Characters). For example: Portuguese people have a lot of family names often we need two of them displayed.
First Name: Tomas
Last Name: Ferraz Amorim Silverio Montenegro
And the result should be Tomas Ferraz Montenegro
A formula will help split the names, but the 40 character limitation still applies to the box and moreover formula will fire only once record is saved but the 40 character limit is fired before the record is saved.
Use the below formula.
Assuming the Contact Object has the FirstName and LastName field, the below formula will resolve the issue.
Create a new formula field in the Contact Object and the data type should be text for this formula.
FirstName & LEFT(LastName,FIND(" ",LastName,1)-1) &RIGHT(LastName,FIND(" ",LastName,1)-1)