Skip to main content
I am having trouble with this formula

 

IF(ISPICKVAL(LegalStratusISV__Matter_Roles__c, "Attorney", Yes, No))

 

There are matter and there are roles on a Matter such as "Attorney" and "Lead Attorney". I am creating a field called "Claimant Represented?" and I want it to return the text "Yes" or "No" depending on if any role with "Attorney" has been added.

 

I am currently getting the error "Field Yes does not exist. Check spelling.

 

 
2 answers
  1. Dec 16, 2019, 6:25 PM
    Assuming the return type of your formula is String type.

     

    To check one specific value as your example, the fix of that specific formula is:

     

    IF(

     

    ISPICKVAL(YourFieldApiName__c,"ValueTiCompare")

     

    ,"Yes","No")

     

    Note the position of the commas and parenthesis. Also the double quotes in the returning values Yes and No

     

    Also you can try:

     

    IF(CONTAINS(TEXT(YourFieldApiName__c), "ValueToCompare"),"Yes","No")

     

    Didn't try this cause I'm replying from my phone. I know CONTAINS doesn't work directly with Picklist fields, but if you get the value as Text maybe that works.

     

    Hope this works ;)

     

    Regards,

     

    Eduardo Asenjo
0/9000