function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andrew Hoban 6Andrew Hoban 6 

Concatonating formula Text field only if all fields are NOT blank

HI all,

I am trying to create a formula text field that will concatonate fileds only if all fields are not blank. At the minute my formula fields just puts them all together regardless of the field values.

Is this possible inside of Salesforce?

My current formula field
First_Name__c & "-" & Last_Name__c & "-" & City__c & "-" & State__c & "-" & Postal_Code__c & "-" & Address1__c & "-" & Mobile_Phone__c
Thanks
 
Best Answer chosen by Andrew Hoban 6
@anilbathula@@anilbathula@
Hi Andrew Hoban 6,

Try this formula:-
IF(AND(First_Name__c !='' , Last_Name__c!='' ,City__c !='', State__c !='',Postal_Code__c!='', Address1__c !='' ,Mobile_Phone__c!=''),First_Name__c & "-" & Last_Name__c & "-" & City__c & "-" & State__c & "-" & Postal_Code__c & "-" & Address1__c & "-" & Mobile_Phone__c,'')

Thanks
Anil.B