+ Start a Discussion
Rahul Luthra 1Rahul Luthra 1 

Use of Contains in formula with AND/OR operator

Hi Folks,

Need help with the below formula. I have picklist field name "Case Description Category" on cases which validates the description field for certain words and update the picklist value. I want this to be run for a specific record type. So this should be like:
(Record type = A) AND (Contains x, y, z)
AND([Case].RecordType.DeveloperName  = "CS Case" OR (
CONTAINS(Lower([Case].Description) ,"seb"),
CONTAINS(Lower([Case].Description) ,"browser issue"), CONTAINS(Lower([Case].Description) ,"error"),
CONTAINS(Lower([Case].Description) ,"listening audio"),
CONTAINS(Lower([Case].Description) ,"invigilator password"),
CONTAINS(Lower([Case].Description) ,"readiness check"),
CONTAINS(Lower([Case].Description) ,"network issues") ) ))

However, I am getting an error - "
The formula expression is invalid: Syntax error"

ShirishaShirisha (Salesforce Developers) 
Hi Rahul,


Can you please try by using If condition instead of AND while checking the recordType and add the value using AND statement.

Also,I would suggest you to try it with one value first to see if it works.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri