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
cpierrecpierre 

Create a formula that results in a # based on a picklist value

Formula newbie here .....
 
How do I create a formula that results in a defined # based on a pick list value?
 
Example:
 
My pick list field is CEO,  values are Yes or No
 
If users select Yes I want the formula field to return a specified #  (any # I decide)
 
 
Thanks in advance!
 
TCAdminTCAdmin

cpierre,

You can create a formula(number) field and a CASE function that would look like this one:

CASE( Type , "Problem", 1, "Feature Request", 2, 3)

If the Case field Type equals "Problem" it will be a value of 1, Feature Request equals 2, all else equals 3.  If you have multiple fields that you want to add together then you can leave this field off the page layout but leave it readable by all profiles.  Then you are not displaying information that the user doesn't need to see.

Chris