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
JSksaJSksa 

Case Management IF and CASE formulas

Hello,

 

I'm trying to create some custom fields in sfdc to give me case duration and age.

 

I'd like  to populate a text value based on multiple numbers found in a custom field. Is that possible?

 

I'm working off of this example in sfdc help with formulas page:

  IF (Days_Open__c > 20, "RED",

IF (Days_Open__c > 10, "YELLOW",

"GREEN") )


Here is what i came up with:        I need to be able to have my NEW field populate values like "Less than 7 Days" if the number in my Days Open field is 7 or less.   

 

F( Days_Open__c  <=7, "Seven or Less",
IF( Days_Open__c  >=7<=15, "Seven to 15 Days",
IF( Days_Open__c  >=16<=30, "Sixteen to 30 Days",

"ESCALATE"))

 

I need to be able to have my NEW field populate values like "Less than 7 Days" if the number in my "Days Open" field is 7 or less. The complicated part is that I need the next text value to be "Seven to Fifteen days" if the value in my Days Open field is  7 THROUGH15.  Teh same with 16-30 days...  Is it possible to do this? or does it have to be single values like in the example given by sfdc?  THANK YOU SO MUCH! 

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

IF statements are mutually exclusive, you don't need to evaluate >= NN 

 

Here's all you need to do.  

IF(Days_Open__c  <=7, "Seven or Less",
IF(Days_Open__c  <=15, "Seven to 15 Days",
IF(Days_Open__c  <=30, "Sixteen to 30 Days",
"ESCALATE")))

 

All Answers

Steve :-/Steve :-/

IF statements are mutually exclusive, you don't need to evaluate >= NN 

 

Here's all you need to do.  

IF(Days_Open__c  <=7, "Seven or Less",
IF(Days_Open__c  <=15, "Seven to 15 Days",
IF(Days_Open__c  <=30, "Sixteen to 30 Days",
"ESCALATE")))

 

This was selected as the best answer
JSksaJSksa

Thank you thank you! :)

Steve :-/Steve :-/

No problem, you owe me a beer!  

 

and I like to drink these! -> 

http://beeradvocate.com/beer/profile/863/7971

 

JSksaJSksa

Ha!

 

Start a tab because I'lll be asking you more questions now that I've discovered this discussion board.   We're gonna be BEST FRIENDS!

 

 

 

 

 

Steve :-/Steve :-/

If you go to Dreafmorce I'm gonna hold you to that!