CASE(TEXT(Primary_Number__c) ,
'Business Phone', PersonContact.Phone ,
'Home Phone',PersonContact.HomePhone ,
'Mobile',
"("&LEFT(PersonContact.MobilePhone,3)&") "&
LEFT(RIGHT(PersonContact.MobilePhone,7),3)
&"-"&RIGHT(PersonContact.MobilePhone,4)
,
NULL)
2 answers
Can you please try this
CASE(TEXT(Primary_Number__c),
'Business Phone', PersonContact.Phone,
"(" & LEFT(PersonContact.Phone, 3) & ") " &
LEFT(RIGHT(PersonContact.Phone, 7), 3)
&
"-" & RIGHT(PersonContact.Phone, 4),
'Home Phone',
"(" & LEFT(PersonContact.HomePhone , 3) & ") " &
LEFT(RIGHT(PersonContact.HomePhone , 7), 3)
&
"-" & RIGHT(PersonContact.HomePhone , 4),
'Mobile',
"(" & LEFT(PersonContact.MobilePhone, 3) & ") " &
LEFT(RIGHT(PersonContact.MobilePhone, 7), 3)
&
"-" & RIGHT(PersonContact.MobilePhone, 4),
NULL
)