You need to sign in to do that
Don't have an account?

How to Split FirstName and LastName
Hello All,
I need help in splitting FirstName and LastName in Account.
My Requirement:
If FirstName is empty, break LastName by first space character and use first part of it as firstname and the remaining as lastname.
How can I achieve this ? Trigger or Config.
Kindly Suggest.
Thanks.
I need help in splitting FirstName and LastName in Account.
My Requirement:
If FirstName is empty, break LastName by first space character and use first part of it as firstname and the remaining as lastname.
How can I achieve this ? Trigger or Config.
Kindly Suggest.
Thanks.
Please try these Two formulas
First Name---->If( CONTAINS(Name, " "),(LEFT(Name, FIND( " ", Name ) -1 )), (LEFT( Name , LEN(Name)- 2)))
Last Name---->If( CONTAINS(Name, " "),(RIGHT(Name, LEN(Name) - FIND(" ",Name))),RIGHT(Name, 2))
Letme know if it is working
Regads
Guru vemuru
All Answers
It is possible with configuration only, but after one space this formula will consider remaining part as a last name.
See below formula
LEFT(Name, FIND( " ", Name ) -1 ) for first name
RIGHT(Name, LEN(Name) - FIND(" ",Name)) for last name
please refer below post
https://success.salesforce.com/answers?id=90630000000Zii1AAC
Regads
Guru Vemuru
Thanks. I have one scenario where firstname is empty and lastname does not have space. Then I need to split last 2 characters and put them in lastname and remaining in firstname.
Please let me know how to solve.
Please try these Two formulas
First Name---->If( CONTAINS(Name, " "),(LEFT(Name, FIND( " ", Name ) -1 )), (LEFT( Name , LEN(Name)- 2)))
Last Name---->If( CONTAINS(Name, " "),(RIGHT(Name, LEN(Name) - FIND(" ",Name))),RIGHT(Name, 2))
Letme know if it is working
Regads
Guru vemuru
Thanks for your help. This is working fine.