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
Aaliya YusufzaiAaliya Yusufzai 

Creating a Formula Checkbox Field

I'm trying to create a Formula Checkbox field and would like to be false if another Field that is a Picklist has a value that has been selected.
Example:
Picklist Field is Stage
IF Stage value is Closed Won, the Checkbox Formula field is False.
IF Stage Value is Signed, the Checkbox Formula field is False.

If someone can help.  Not sure how to create a checkbox formula field.
Best Answer chosen by Aaliya Yusufzai
Amit Chaudhary 8Amit Chaudhary 8
Please try below formula
If( text(PicklistField__c) =='Closed Won' || text(PicklistField__c) =='Signed', false ,true)
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please try below formula
If( text(PicklistField__c) =='Closed Won' || text(PicklistField__c) =='Signed', false ,true)
 
This was selected as the best answer
Akhil AnilAkhil Anil
Hi Aaliya,

You just need to create a new formula field of the type "Checkbox" with the below formula.
 
CASE(StageName,
"Closed Won",1,
"Signed",1,
0) = 0

Use the insert field option to use the right API names of the fields.
Aaliya YusufzaiAaliya Yusufzai
Thank you Amit!  It worked perfectly.

Also, thanks Akhil for answering, they both work, but i can only select one best answer
Aaliya YusufzaiAaliya Yusufzai
Just another quick question.  If I wanted to add in this formula field another field other then Stage. Other field name is "Sent" and this is a checkbox.  I want to make sure that if the above is applied and if the other field of Sent is checked equals false.
How can I get this
Akhil AnilAkhil Anil
You just have to tweak your formula like this
 
IF(
AND(
CASE(StageName,
"Closed Won",1,
"Signed",1,
0) = 0,
Sent__c
),
FALSE,
TRUE
)

 
Aaliya YusufzaiAaliya Yusufzai
Thanks so much Akhil!! It works.
 
Darrell GallegosDarrell Gallegos
@Akhil Why does the following suggestion end with = 0? I have seen IF and Case statements end in either = 0 or = 1 and I don't understand why.

CASE(StageName, "Closed Won",1, "Signed",1, 0) = 0
Shaik AroofShaik Aroof
What on percentage calculation While using and function
 
Onome OkoroduduOnome Okorodudu
Hi guys 
Using the above formula , am trying to acheive similar requirement . However , would like the formula checkbox to return TRUE , if the following behaivours are met 
  • picklist field = approved
  • Checkbox field = true
  • returned result on formula field = true .

please see what i have -
Data TypeFormula  
IF(
AND(
CASE(SBQQ__Opportunity2__r.Zift_Deal_Approval_Status__c,
"Approved",1,
1) = 0,
SBQQ__Opportunity2__r.Zift_Registered_Deal__c
),
TRUE,
FALSE
)