Concatenate fields with an IF statement - Answers - Salesforce Trailblazer Community
Ask Search:
Pooja AroraPooja Arora 

Concatenate fields with an IF statement

Hello, 
I need help with a formula.  I am trying to concatenate two fields and also add an IF statement.  
It doesn't seem to be working.  This is what I have so far:

Name&"" &RecordType.Name& ""&
(IF(NOT(ISBLANK(Report_Date__c)), Report_Date__c, TODAY())
Best Answer chosen by Pooja Arora
Deepak AnandDeepak Anand
Try this = 
Name + "-" + 
RecordType.Name + "-" +
TEXT(BLANKVALUE(Report_Date__c, TODAY()))

All Answers

Deepak AnandDeepak Anand
Try this = 
Name + "-" + 
RecordType.Name + "-" +
TEXT(BLANKVALUE(Report_Date__c, TODAY()))
This was selected as the best answer
Ahilesh RagavanAhilesh Ragavan
++
If you need the date in MM/DD/YYYY then try this:
Name&" "&RecordType.Name&" "&
IF(NOT(ISBLANK(Report_Date__c)),​​​​TEXT(MONTH(Report_Date__c))&"/"&TEXT(DAY(Report_Date__c))&"/"&TEXT(YEAR(Report_Date__c)),
TEXT(MONTH(TODAY()))&"/"&TEXT(DAY(TODAY()))&"/"&TEXT(YEAR(TODAY())))