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
rv90rv90 

Formula field to concatenate 3 fields ?

I have 4 custom field that needs to be concatinated in a single formule custom field. For example: 

Field1__c  = 'India' 
Field2__c = 'Australia'
Field3__c  = 'America'
Field4__c  = 'London'

Now, in the New Formule field i need the output as: 

C_Field__c = Field1__c+ Field2__c + Field3__c  + Field4__c  ( with '/' seperating all the string) 

ie;.  C_Field__c = 'India/Australia/America/London'

If nothing is enterred in the those 4 fields it should return Field6__c 

Nithesh NNithesh N
Try this, 
 
IF( ISBLANK( Field1__c + Field2__c + Field3__c + Field4__c),
     Field6__c, 
     Field1__c +'/'+Field2__c+'/'+Field3__c+'/'+Field4__c )

Let me know if it works..

Best,
Nithesh
rv90rv90
Thanks Nitesh. It worked partially... If any of the fields is null then the output is returning like below ;

 C_Field__c = ' /Australia/America/London'
'/' is not getting removed when we have any of those fields with no value. 

***

If we have vlaue for only 1 field then it should return field 1 value 
If we have value entered for 1 and 2 fields then it should return -1/2
If we have value entered for 1, 2 and 3 fields then it should return -1/2/3
If we have value entered for 1,2,3 and 4 fields then it should return -1/2/3/4

If there is value for 1 ,2 and 4 then it should return -1/2/4
 
Nithesh NNithesh N
Oh...Let me try another approach then.
rv90rv90
Sure thanks 
rv90rv90
Hi Nithesh, Did you get any other approach to handle this scenario? Please let me know. 
 
ujwal thejaujwal theja
Hi,


As per sequence, this code is working fine. But, I have some doubt in slash's part. I will try to solve shortly. Meanwhile, you please check this one.
 
IF(ISBLANK( Field1__c + Field2__c + Field3__c + Field4__c ), Field6__c ,
IF(ISBLANK( Field1__c ), Field2__c +' '+ Field3__c +' '+ Field4__c ,
IF(ISBLANK( Field2__c ), Field1__c +' '+ Field3__c +' '+ Field4__c ,
IF(ISBLANK( Field3__c ), Field1__c +' '+ Field2__c +' '+ Field4__c ,
IF(ISBLANK( Field4__c ), Field1__c +' '+ Field2__c +' '+ Field3__c ,
IF(ISBLANK( Field1__c + Field2__c ), Field3__c +' '+ Field4__c ,
IF(ISBLANK( Field2__c + Field3__c ), Field1__c +' '+ Field4__c ,
IF(ISBLANK( Field3__c + Field4__c ), Field1__c +' '+ Field2__c ,
IF(ISBLANK( Field1__c + Field4__c ), Field2__c +' '+ Field3__c ,
IF(ISBLANK( Field1__c + Field3__c ), Field2__c +' '+ Field4__c ,
IF(ISBLANK( Field2__c + Field4__c ), Field1__c +' '+ Field3__c ,
IF(ISBLANK( Field1__c + Field2__c + Field3__c ), Field4__c ,
IF(ISBLANK( Field2__c + Field3__c + Field4__c ), Field1__c ,
IF(ISBLANK( Field1__c + Field3__c + Field4__c ), Field2__c ,
IF(ISBLANK( Field1__c + Field2__c + Field4__c ), Field3__c, Field1__c +'/'+ Field2__c +'/'+ Field3__c +'/'+ Field4__c )))))))))))))))
Thanks,
Ujwal K
 
Rizwan Ali 8Rizwan Ali 8
I want to concatenate text field with number field with () on number field
Rizwan Ali 8Rizwan Ali 8
Alhamdulilah ...

I have done !
Name &"("&  TEXT(Amount)&")"
 
Kathy Pilgram 14Kathy Pilgram 14
I am trying to do this as well, did Ujwal's solution work and it not show the slashes unless the field was populated?  Thank you! @RV90
Deepanjana Maity 4Deepanjana Maity 4
How to concatenate date followed by six digit number