Skip to main content
I have an Opportunity standard field called “Type.” This is a picklist field with the values Launchpad, New Client, and Renewal. Each of these picklist values had a unique id that I want to return when there’s a match. The unique ID is not a Salesforce field, it is a text value I’d like each value to correspond to.

 

I’m trying to write a concatenated formula that will return the following logic:

 

If (Type == Launchpad ) {

 

return “EXP";

 

} else if (Type == New Client ) {

 

return “NEW”; else if (Type == Renewal ) {

 

return “REN”;

 

}; 

 

I then want to take that value and concatenate it with Account_Code__c

 

and CloseDate, which would be in the format of mmddyy. So the final formula would return:

 

Account_Code__c_Type_CloseDate

 

Can anyone please help? Thank you in advance!
8 个回答
  1. 2015年7月8日 09:34
    Hi Kevin,

     

    +1 All.

     

    Please try the below

    CASE(Type,

    "Launchpad", "EXP",

    "New Client", "NEW",

    "Renewal", "REN",

    NULL)+"_"+ Account_Code__c +"_"+

    IF(MONTH(CloseDate)<=9, "0"+TEXT(MONTH(CloseDate)), TEXT(MONTH(CloseDate)))+

    IF(DAY(CloseDate)<=9, "0"+TEXT(DAY(CloseDate)), TEXT(DAY(CloseDate)))+

    RIGHT(TEXT(YEAR(CloseDate)),2)

     

     
0/9000