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
Lukasz PiziakLukasz Piziak 

Formula field based on multiple checkbox fields

Hello,

I'm looking for help with creaing formula field (text type) based on 3 checkbox fields. E.g

1. if checkbox 1 is true and checkbox 2 is false and Checkbox 3 is false, formula should populate 'A',
​2. if checkbox 1 is false and checkbox 2 is true and Checkbox 3 is false, formula should populate 'B', 
​1. if checkbox 1 is false and checkbox 2 is false and Checkbox 3 is true, formula should populate 'C', 

Thanks for any help
Regards,
Lukasz
Best Answer chosen by Lukasz Piziak
Ishwar ShindeIshwar Shinde
Please create formula as per below example -

If(checkbox_1 && !checkbox_2 && !checkbox_3,'A', (If(!checkbox_1 && checkbox_2 && !checkbox_3,'B',   (If(!checkbox_1 && !checkbox_2 && checkbox_3,'C', '')   ))

Please mark this as best ans if this helps!!!

All Answers

Ishwar ShindeIshwar Shinde
Please create formula as per below example -

If(checkbox_1 && !checkbox_2 && !checkbox_3,'A', (If(!checkbox_1 && checkbox_2 && !checkbox_3,'B',   (If(!checkbox_1 && !checkbox_2 && checkbox_3,'C', '')   ))

Please mark this as best ans if this helps!!!
This was selected as the best answer
Amol JadhavAmol Jadhav
IF(AND(checkbox_1__c, !(checkbox_2__c), !(checkbox_3__c)), 'A' ,
    IF(AND(!(checkbox_1__c), checkbox_2__c, !(checkbox_3__c)), 'B' ,
       IF(AND(!(checkbox_1__c),!(checkbox_2__c), checkbox_3__c),'C' ,' ')))