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
nelle3223nelle3223 

Validation between two checkboxes

Hello I am trying to come up with a validation rule around two checkboxes.  If one checkbox is checked the other one must be checked.  I tried an IF logic but still not working.  Any ideas?
Best Answer chosen by nelle3223
Becka DBecka D
Ahhh, that's slightly different. In that case, you would want something like:
 
AND(Mock__c, NOT(Ballpark__c))

 

All Answers

KaranrajKaranraj
Try the below validation rule
IF(checkbox1__c == TRUE && checkbox2__c== FALSE,TRUE,IF(checkbox1__c ==FAlse && checkbox2__c== TRUE,TRUE,False))

 
Becka DBecka D
I would think that it could be as simple as:
 
Checkbox1__c <> Checkbox2__c

If they don't have the same value (either both checked or both unchecked), the formula evaluates to true, and your user will get an error message.

 
nelle3223nelle3223
OK thanks!  So what i am trying to get we have a checkbox called Mock and if Mock is checked then the Ballpark checkbox must be checked as well.  But Ballpark checkbox can be checked by itself.
Becka DBecka D
Ahhh, that's slightly different. In that case, you would want something like:
 
AND(Mock__c, NOT(Ballpark__c))

 
This was selected as the best answer
nelle3223nelle3223
It works!!  Thanks so much!
Becka DBecka D
Great!! If you don't mind marking a Best Answer, that way the community will know that this question is now solved & what the solution is. Helps to keep the boards clean!
Becka DBecka D
(The "Best Answer" option will appear next to the "Flag" option when you hover there.)