1

I want to create a formula field (Value__c) where I have to display 4 different texts (A, B, C, D) depending on another picklist field's value. I am trying to add an OR condition on my formula but its not getting saved. My picklist field (Score__c) has 16 values. (1,2,3,4......,16). I want to create formula which shows me the result that If I choose 1,2,3 or 4 it display A on Value__c field, if I choose 5,6, 7 or 8, display B and so on... I have chosen Formala Return type as 'Text'. Here is my formula which is not getting saved.

IF(ISPICKVAL(Score__c, "1" || "2" || "3" || "4"),"A",""), IF(ISPICKVAL(Score__c, "5" || "6" || "7" || "8"),"B",""), IF(ISPICKVAL(Score__c, "9" || "10" || "11" || "12"),"C",""), IF(ISPICKVAL(Score__c, "13" || "14" || "15" || "16"),"D","")
  • Or try "OR" instead of "IF" and get rid of all the || ? – Rene Schiffer Feb 27 '18 at 17:18
1

Try below formula. Not sure the way you are using the OR logic there.

IF(
    (ISPICKVAL(Score__c, "1") || ISPICKVAL(Score__c,"2") || ISPICKVAL(Score__c,"3") || ISPICKVAL(Score__c,"4")),"A",
    IF((ISPICKVAL(Score__c, "5") || ISPICKVAL(Score__c,"6") || ISPICKVAL(Score__c,"7") || ISPICKVAL(Score__c,"8")),"B",
        IF((ISPICKVAL(Score__c, "9") || ISPICKVAL(Score__c,"10") || ISPICKVAL(Score__c,"11") || ISPICKVAL(Score__c,"12")),"C",
            IF((ISPICKVAL(Score__c, "13") || ISPICKVAL(Score__c,"14") || ISPICKVAL(Score__c,"15") || ISPICKVAL(Score__c,"16")),"D",""))))
| improve this answer | |
  • 1
    Pleasure to help you.Cheers! – highfive Nov 18 '14 at 7:13

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.