+ Start a Discussion
Salesforce 283Salesforce 283 

How to use CONTAINS in picklist field using formulas?

Hi Guys,

I want to write a validation in one object. I will have to write on picklist(ISPICKVAL) but i need to implement contains function in picklist field and how to write that. Please provide me some examples.

Thanks,
Mahesh.
Best Answer chosen by Salesforce 283
Amit Chaudhary 8Amit Chaudhary 8
You can try like below
CONTAINS(Text( FieldName__C ),"ReadUP")
Tips for Working with Picklist and Multi-Select Picklist Formula Fields

Please check below post.
https://help.salesforce.com/apex/HTViewHelpDoc?id=tips_for_using_picklist_formula_fields.htm&language=en_US (https://help.salesforce.com/apex/HTViewHelpDoc?id=tips_for_using_picklist_formula_fields.htm&language=en_US)

Please let us know if this will help you

Thanks
Amit Chaudhary

All Answers

Jithin Krishnan 2Jithin Krishnan 2
Hi,
You can check like this:
CONTAINS( TEXT(picklist__c ), texttocheck)

where texttocheck is the string you want to check in the picklist value. Please let me know if you have any doubts.
Thanks!
Amit Chaudhary 8Amit Chaudhary 8
You can try like below
CONTAINS(Text( FieldName__C ),"ReadUP")
Tips for Working with Picklist and Multi-Select Picklist Formula Fields

Please check below post.
https://help.salesforce.com/apex/HTViewHelpDoc?id=tips_for_using_picklist_formula_fields.htm&language=en_US (https://help.salesforce.com/apex/HTViewHelpDoc?id=tips_for_using_picklist_formula_fields.htm&language=en_US)

Please let us know if this will help you

Thanks
Amit Chaudhary
This was selected as the best answer
Salesforce 283Salesforce 283
Hi Amit, It's working. Thanks a lot.