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

Split the name into first name and last name; If second string is absent then how can update??
Their is one custom field NAME on lead object consist of two string (first and last name) seperated by space . Their are two standard field on lead object
1. First Name, 2. Last Name.
I am updating first string of NAME field(Custom field) in the Last Name standard field and second string of NAME field in First Name of Standard Field, using workflow+ field update.

Update Last Name using Formula: LEFT( Name__c ,FIND(" ", Name__c ))
Updat First Name using Formula : MID( Name__c , FIND(" ", Name__c ), LEN(Name__c ) )
Now My Question is If second string in NAME string is absent then first name field should be updated to blank because it optional field. How i can use the formula; Please Suggest
Note: In custom name field i'm inserting data from web to lead.
1. First Name, 2. Last Name.
I am updating first string of NAME field(Custom field) in the Last Name standard field and second string of NAME field in First Name of Standard Field, using workflow+ field update.
Update Last Name using Formula: LEFT( Name__c ,FIND(" ", Name__c ))
Updat First Name using Formula : MID( Name__c , FIND(" ", Name__c ), LEN(Name__c ) )
Now My Question is If second string in NAME string is absent then first name field should be updated to blank because it optional field. How i can use the formula; Please Suggest
Note: In custom name field i'm inserting data from web to lead.
Last name is Mandatory field on the Lead object, so you should always make usre you enter both first string and last string in the Name__c,
What I suggest is
1. If Name__c is filled only with one string then populate this on Last Name standar field and
2. If Name__c is filled with both the string then have your current logic.
You can use
If( CONTAINS(Name__c, " "), LEFT( Name__c ,FIND(" ", Name__c )), Name__c ) - for Last Name
If( CONTAINS(Name__c, " "), MID( Name__c , FIND(" ", Name__c ), LEN(Name__c )), null) - for First Name
This will even retain the value in Standard Name field even if you null of Name__c value.
All Answers
You can use this to update your first name
BLANKVALUE(MID( Name__c , FIND(" ", Name__c ), LEN(Name__c ) ), LEFT( Name__c ,FIND(" ", Name__c )))
My requirement is when second string is absent then first name field should be updated to blank.
Here you go
If( CONTAINS(Name__c, " "), MID( Name__c , FIND(" ", Name__c ), LEN(Name__c )), null)
when i blank second string, this formula also not allow to me save the record. Please guide me.
Last name is Mandatory field on the Lead object, so you should always make usre you enter both first string and last string in the Name__c,
What I suggest is
1. If Name__c is filled only with one string then populate this on Last Name standar field and
2. If Name__c is filled with both the string then have your current logic.
You can use
If( CONTAINS(Name__c, " "), LEFT( Name__c ,FIND(" ", Name__c )), Name__c ) - for Last Name
If( CONTAINS(Name__c, " "), MID( Name__c , FIND(" ", Name__c ), LEN(Name__c )), null) - for First Name
This will even retain the value in Standard Name field even if you null of Name__c value.