[SalesForce] Issue – Picklist fields are only supported in certain functions

I am working around salesforce's formula field in Process Builder, to compare two fields values. For instance, the field Contact_A__c and Contact_B__c are picklist field types. I am attempting to compare several values of the picklist fields. In particular, I am attempting to create a comparison formula field to update the value of a text field "Result of Comparison" as an immediate action when the following condition is fulfilled.

IF(OR(ISPICKVAL([Comparison__c].Contact_A__c.Tipo__c, "Gold Partner", 
   CONTAINS([Comparison__c].Contact_B__c.Tipo__c, "Silver Partner")), 
   "The Contact A represent an excelent Opportunity")

However, it is appearing the following

Error message: "The formula expression is invalid: Field Comparison
is a picklist field. Picklist fields are only supported in certain
functions"

After to review http://resources.docs.salesforce.com/208/20/en-us/sfdc/pdf/salesforce_useful_formula_fields.pdf I understood better how to compare two text fields. But, I have not been able to identify what is required to overcome the error message. So, could you please suggest me how could be solved the error message of the formula field of Process Builder?

Best regards,

Best Answer

CONTAINS does not work on picklist fields, only text fields. You should be able to convert the value as you like using TEXT:

IF(OR(
  ISPICKVAL([Comparison__c].Contact_A__c.Tipo__c, "Gold Partner"), 
  CONTAINS(TEXT([Comparison__c].Contact_B__c.Tipo__c), "Silver Partner")),
  "The Contact A represent an excelent Opportunity",null)
Related Topic