You need to sign in to do that
Don't have an account?
Serena Schultz
Workflow formula to replace first digit in phone number with "+256"
Hello!
I'm trying to create a workflow rule/field update formula to to replace first digit in phone number field with "+256". (Example: 0702475002 should be +256702475002).
I've tried the following two forumulas so far without luck - any help would be appreciated!!
if(begins (Phone_Number__c, "0"),
substitute(Phone_Number__c,"0", “+256"),"")
IF(BEGINS(Phone_Number__c,"0"), RIGHT(Phone_Number__c,1), “+256”)
Serena
I'm trying to create a workflow rule/field update formula to to replace first digit in phone number field with "+256". (Example: 0702475002 should be +256702475002).
I've tried the following two forumulas so far without luck - any help would be appreciated!!
if(begins (Phone_Number__c, "0"),
substitute(Phone_Number__c,"0", “+256"),"")
IF(BEGINS(Phone_Number__c,"0"), RIGHT(Phone_Number__c,1), “+256”)
Serena
New rule: remove the first digit (no matter the number) and then add the "+256" and the rest of the number.
if(len(Phone_Number__c) > 1,
"+256"+right(Phone_Number__c, LEN(Phone_Number__c)-1 ),Phone_Number__c)
Best regards
Alain
All Answers
SUBSTITUTE(LEFT(Phone_Number__c,1), "0", "+256"+Phone_Number__c)
SUBSTITUTE(LEFT(Phone_Number__c,1), "0", "+256"+MID(Phone_Number__c, 2, 10))
if(and(begins (Phone_Number__c, "0"), len(Phone_Number__c) > 1),
"+256"+right(Phone_Number__c, LEN(Phone_Number__c)-1 ),Phone_Number__c)
Best regards
Alain
New rule: remove the first digit (no matter the number) and then add the "+256" and the rest of the number.
if(len(Phone_Number__c) > 1,
"+256"+right(Phone_Number__c, LEN(Phone_Number__c)-1 ),Phone_Number__c)
Best regards
Alain