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
OssieOssie 

Concatenate 2 Fields

Hi,

 

Is it possible to concatenate 2 fields and then set this as a value of a different field.

 

for example:

 

Field1__c = Field2__c + Field3__c

 

Is this possible??

 

Thanks in advance! 

Best Answer chosen by Admin (Salesforce Developers) 
Baktash H.Baktash H.

yes, why not?

it depends on the types of the 2 fields.

You can solve this with a formula field.

 

for example:

formula field type text:

Full Name = LastName & ", " & FirstName

All Answers

Baktash H.Baktash H.

yes, why not?

it depends on the types of the 2 fields.

You can solve this with a formula field.

 

for example:

formula field type text:

Full Name = LastName & ", " & FirstName

This was selected as the best answer
Shashikant SharmaShashikant Sharma

Yes it is possible you will just require a workflow or a trigger. Let me know if you have any issue in it. You can read

trigger in : http://forceschool.blogspot.com/search/label/Apex%20Triggers 

OssieOssie

Thank You

OssieOssie

Thank You  that was very helpful.

Mayank_JoshiMayank_Joshi

Thanks Baktash H. ,

 

I was able to resolve due to your solution . But , using this formula : Full Name = LastName & ", " & FirstName (for concatenating two lookup values is actually concatenating IDs ) 

 

I have achieved this by below formula inherited from you ,this will help if somebody facing similar issue like me : 

LastName__r.Name   + " " +  FirstName__r.Name  

Taylor Figge 10Taylor Figge 10
Is it possible to concatenate a name field and a formula field?
Taylor Figge 10Taylor Figge 10
CASE( Industry ),"Agriculture", (CASE( Emp_Range__c ),"1-4","1.0","5-9","1.0","10-24","1.2","25-49","1.5","50-99","2.1","100-249","2.6","250+","3.0",)"Banking", (CASE( Emp_Range__c ),"1-4","1.1","5-9","1.3","10-24","1.5","25-49","1.9","50-99","2.9","100-249","3.4","250+","6.2",)"Construction", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.2","10-24","1.3","25-49","1.4","50-99","2.1","100-249","2.2","250+","4.1",)"Consulting", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.3","10-24","1.4","25-49","1.9","50-99","2.0","100-249","3.0","250+","5.0",)"Education", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.5","10-24","1.7","25-49","1.9","50-99","3.2","100-249","4.3","250+","5.0",)"Energy", (CASE( Emp_Range__c ),"1-4","1.1","5-9","1.3","10-24","1.5","25-49","2.3","50-99","3.0","100-249","3.7","250+","6.7",)"Engineering", (CASE( Emp_Range__c ),"1-4","1.3","5-9","1.3","10-24","1.5","25-49","1.6","50-99","2.2","100-249","3.3","250+","6.0",)"Entertainment", (CASE( Emp_Range__c ),"1-4","1.0","5-9","1.0","10-24","1.2","25-49","1.4","50-99","1.9","100-249","2.0","250+","3.8",)"Finance", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.2","10-24","1.5","25-49","2.3","50-99","3.5","100-249","3.7","250+","4.0","Government", (CASE( Emp_Range__c ),"1-4","1.6","5-9","2.0","10-24","2.2","25-49","2.9","50-99","3.1","100-249","3.3","250+","4.0","Healthcare", (CASE( Emp_Range__c ),"1-4","1.3","5-9","1.5","10-24","1.6","25-49","2.3","50-99","2.7","100-249","2.8","250+","8.5","Hospitality", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.3","10-24","1.7","25-49","2.3","50-99","3.9","100-249","4.2","250+","4.5","Insurance", (CASE( Emp_Range__c ),"1-4","1.0","5-9","1.4","10-24","1.6","25-49","2.6","50-99","3.0","100-249","4.0","250+","14.0",)"Manufacturing", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.3","10-24","1.4","25-49","1.7","50-99","2.2","100-249","2.6","250+","3.0",)"Not for Profit", CASE( Emp_Range__c ),"1-4","1.2","5-9","1.3","10-24","1.4","25-49","2.3","50-99","3.4","100-249","4.5","250+","5.0",)"Other", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.3","10-24","1.4","25-49","1.8","50-99","2.2","100-249","2.7","250+","4.7",)"Retail", (CASE( Emp_Range__c ),"1-4","1.2","5-9","1.3","10-24","1.3","25-49","1.6","50-99","1.6","100-249","2.3","250+","5.6",)"Transportation", (CASE( Emp_Range__c ),"1-4","1.1","5-9","1.2","10-24","1.2","25-49","1.5","50-99","2.1","100-249","2.3","250+","2.8"),"")))))))))))))))))))


This is what I typed out, but it says I have a syntax error: extra "," how do I fix this?
Taylor Figge 10Taylor Figge 10
Also, do I need ,NULL at the end of each industry?
 
Sandaya Joy 4Sandaya Joy 4
@Shashikant Sharma @Baktash H.
Hi everyone,
I am in a very complicated situation. Please give some inputs or ideas to tackle this.
In our org some managers are using a Form (made using Formstack)to gather information from customers at the time of some changes in their requirement. So, this changes what customers are asking are capturing as a custom object 'Request' in SF. All the fields in the form are mapped to the custom fields (on Request object) in SF.
But the requirement is, most of this custom field they don't want to see in the page layout of request. Instead of that they want to put most of the field's data capturing in the form wanted in description field-'Request Detail'in SF.
For example:
Form fields: Request due date, Regions (picklist type), Country(picklist), Description fields (there are many fields in forms that are picklist,date,free text,checkbox)
In SF they need all the above field information in a single 'Request Detail' Description field. That too if the form field is blank while filling by manager, that field shouldn't include in the 'Request Detail'. It should only include form fields data in 'Request Detail'(in SF) if it's not blank while filling the form.
How can i include all these criterias and capture all the field data from that form to a single field in SF?
So complicated for me.
Any inputs will really help. Please let me know if more information is required 
Thanks
Sandaya
Kelly RyndaKelly Rynda
Hi all,

I have a related question. I'm concatenating event names for two event types for contacts who have a status of "checked-in" on these event records. I have a DLRS rollup with the below:

Event_Type__c = 'Inservice' AND CnP_PaaS_EVT__CheckIn_Status__c = 'Checked-In'

But now I need to add a second event type:

Event_Type__c = 'Equity' AND CnP_PaaS_EVT__CheckIn_Status__c = 'Checked-In'

I'm having trouble figuring out the correct way to put these two items in the Relationship Criteria field in DLRS without having syntax errors. I need an "or," but I haven't found how to write that.

Thanks!