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
cunninjacunninja 

Trying to generate a number formula field to output Text

Hey everyone

 

I'm trying to get a text output from a number formula. Basically, I want the formula to say,  IF (Today) > Due Date = "Status Critical", or IF (Today) <= Due Date = "Status Normal". is there anyway to generate this custom fourmula field so i can stick it on a task report? Thanks for your help!

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

Okay, if those are your only 2 values "Critical" or "Normal" then you could use a Formula like this:

 

IF(Due Date <= TODAY(), "Status Critical", "Status Normal")

what it's basically saying is: IF the Due Date is Less Than OR Equal to TODAY then display Status Critical, other wise display Status Normal"

 

All Answers

Steve :-/Steve :-/

Yes, you need to create a Formula(Text) Field and insert your IF statements into the formula.  One thing you'll need to be careful of when working with IF statements is that you always need to supply it with an Else result.  In other words "what to display in case all of the IF? are False"   

cunninjacunninja

thanks, Stevemo. I'm not very experienced with the formulas either. Do you have a thought on exactly what the formula criteria would be for what i described in the first post? Thanks

Steve :-/Steve :-/

Okay, if those are your only 2 values "Critical" or "Normal" then you could use a Formula like this:

 

IF(Due Date <= TODAY(), "Status Critical", "Status Normal")

what it's basically saying is: IF the Due Date is Less Than OR Equal to TODAY then display Status Critical, other wise display Status Normal"

 

This was selected as the best answer
cunninjacunninja

Great, thanks Stevemo!.