I am new to SF. I have a requirement where I am creating a Formula field. Basically I have three checkboxes, Check box1, Checkbox 2, Checkbox 3. I want to say something like

If Checkbox1=true, "Term1" else if Checkbox2=True,"term 2 else "term 3"

Please let me know how to accomplish this. Thanks.

  • 1
    The Help link on the formula editor page is actually very helpful and has a lot of examples. – Jeremy Nottingham Sep 26 '14 at 19:56

Formula fields can contain IF statements and I recommend reading the formula help, which is quite good documentation. IF statements work in the formula editor like they do in almost every programming language IF ( Evaluation Criteria returns boolean, Value if true, value if false ) and these IF statements can be nested inside each other.

IF(Checkbox1,"Term 1", IF(Checkbox2, "Term 2", "Term 3"))

With Checkbox1 being the API Name of the field, something like Checkbox1__c

| improve this answer | |
  • so if checkbox1 and 2 are false it will pick 3 right? – QKA Sep 26 '14 at 19:57
  • This seems to follow the words, but I don't know where Checkbox 3 is supposed to come in. – Jeremy Nottingham Sep 26 '14 at 19:57
  • got it, I need to word it better – QKA Sep 26 '14 at 19:59
  • The logic of this formula follows your logic and will evaluate from left to right. If Checkbox1 is true, show Term 1, if it is false, then evaluate if Checkbox 2 is true and show Term 2, if Checkbox2 is false, show Term 3 as the default value if both Checkbox 1 and 2 are false. – greenstork Sep 26 '14 at 19:59
  • so I know this might be silly for me to ask but I will ask anyway.. what if I had it like if chbox 1=true then "term1, if chkbox 2=true then term 2, if checkbox 3=true then term 3 – QKA Sep 26 '14 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.