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
Knight12@tarunKnight12@tarun 

Validation Rule For two check boxes

HI Board,

 

   could any one help from a situation . The Situation is I do have two Check boxes (Checkbox A & Checkbox B).And My condition is to allow any one of the check box is true ,not the two at a time.

 

If checkbox A is true , Check box B should be False  and IF Checkbox B is true , Check box  B should be False , Both should not be TRUE.

 

 

 

Thanks In ADVANCE

Tarun(Dark Knight)

 

Best Answer chosen by Admin (Salesforce Developers) 
Prady01Prady01

You can use the Validation rule to do this and display the error if both are checked, Anyhow the formula is!

In Error Condition Formula you can put it as==>
AND(FirstCheckbox,SecondCheckbox)

In Error Message:Can't check both the check box at once

 Hope this helps!

 

Thanks

Prady

All Answers

Prady01Prady01

You can use the Validation rule to do this and display the error if both are checked, Anyhow the formula is!

In Error Condition Formula you can put it as==>
AND(FirstCheckbox,SecondCheckbox)

In Error Message:Can't check both the check box at once

 Hope this helps!

 

Thanks

Prady

This was selected as the best answer
Knight12@tarunKnight12@tarun

Hey Prady01,

 

 

     Its working well. Thanks for your help

 

 

 

Thanks,

Tarun

rjv94rnjnrjv94rnjn
Hi,

its working but when no of checkbox increases it fails. can any one help me with this same one checkbox checked condition with multiple checkbox
Milan ParikhMilan Parikh
Hi,

 This works fine with two checkbox.

Thanks,
Milan Parikh
Sai GuptaSai Gupta
Try this..

Assume that HOT and COLD are the two check boxes.

(Hot  && Cold ) || (!Hot  && !Cold)

Error: You can select either HOT or COLD

Hope this helps.

Sai Kumar
Cathy PostmusCathy Postmus
I had to enter my flow validation on the checkboxes this way, if I wanted the user to choose one or the other checkbox, but not both:

OR({!checkbox1},{!checkbox2})