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
nathanbnathanb 

Formula using checkbox- How do I do it?

Hi.

 

I've got two fields that should calculate a score based on a number of other field values. Using case statements like this:

MAX(0,MIN(100,(
(

CASE( How_Big_Is_Your_Data_Environment__c,
"Less than 100 GB",0,
"100-500 GB",1,
"500 GB- 1 TB",2,
"1 TB- 50 TB",5,
"50 TB-100 TB",5,
"100 TB- 1 PB",4,
"1 PB +",3,
0.5) 
+
CASE( What_Of_Your_Data_Is_Unstructured__c,
"Less than 10%",0,
"10%-25%",2,
"25%-50%",6,
"50%-75%",10,
"75%-100%",10,
0.5)
 

 I'm able to get a lead score, but only when it comes to picklist values. But I'd like to do the same thing with a checkbox value. For instance, I have a field called "Requested Download" which is a checkbox. I tried something like this:

 

CASE( Requested_Download__C,

"True", 50,

"False", 1,

)

 

And I get an error telling me this is the incorrect use of a case statement. So, how would I be able to do this using a checkbox value?

 

Thank You.  

Steve :-/Steve :-/
The format for a custom formula field that evaluates whether or not a checkbox field is checked is:

IF({!CheckboxField}, value_if_true, value_if_false)

 


So

 

IF(Requested_Download__C,50,1)

 

 

 

Jean WaltersJean Walters
I've been searching for hours to understand how to create a formula that would return one value if the checkbox is true and another value if the checkbox is false, and this is the only response that addressed it.  THANK YOU!