+ Start a Discussion
:) :) :) :) :):) :) :) :) :) 

How can I split custom Customer Name text field into firstname and lastname

We have Contact us (web2lead) form on our company website. In that contact us form we have asked only four fields Name, Email, Phone and State. Name field is feeding custom Customer Name field (Type Text , size = 255), Email field is feeding Standard Email field, Phone is feeding Standard Phone field and State is feeding Standard State/Province field in salesforce. 

 

I am trying to make a workflow field update that split Customer Name and feed First name and Last name Standard fields but I am not sure which formula functions should I use for splitting. Anyone has any Idea?

Best Answer chosen by Admin (Salesforce Developers) 
:) :) :) :) :):) :) :) :) :)

After lots of try and Errors I finally solved my problem.

 

First Name: TRIM(LEFT(  Customer_Name__c, FIND(" ", Customer_Name__c)))

Last Name: RIGHT(Customer_Name__c ,LEN(Customer_Name__c) - FIND(" ", Customer_Name__c))

All Answers

:) :) :) :) :):) :) :) :) :)

After lots of try and Errors I finally solved my problem.

 

First Name: TRIM(LEFT(  Customer_Name__c, FIND(" ", Customer_Name__c)))

Last Name: RIGHT(Customer_Name__c ,LEN(Customer_Name__c) - FIND(" ", Customer_Name__c))

This was selected as the best answer
vivek singh08481200707119766vivek singh08481200707119766
Same problem with me where use this code please provide the object body