You need to sign in to do that
Don't have an account?

Picklist SOQL 'Like' operation
I'm trying to query for records, filtered by picklist values but can't do it.
I have a page where I have a search box, when the user insert a letter I have an apex:actionSupport that needs to get all the records where picklist values containing this letter (or more than 1 letter) .
For example - If I have records of 'Case' where I'm looking for the field 'Status' and one of the values is 'New' and the user inserts 'Ne' to the search box, I want to query all the 'Case' records where their Status is 'New' ..
Can anybody help ?
I have a page where I have a search box, when the user insert a letter I have an apex:actionSupport that needs to get all the records where picklist values containing this letter (or more than 1 letter) .
For example - If I have records of 'Case' where I'm looking for the field 'Status' and one of the values is 'New' and the user inserts 'Ne' to the search box, I want to query all the 'Case' records where their Status is 'New' ..
Can anybody help ?
Can you share your code what you haev done already, so I can correct the mistake...Else I will provide the query for the same.
Thanks,
Sandeep
All Answers
Can you share your code what you haev done already, so I can correct the mistake...Else I will provide the query for the same.
Thanks,
Sandeep
list<ContentVersion > allVerions_List = [SELECT Id, Title, Product__c FROM ContentVersion WHERE Product__c includes (:choenSearchedProductDetail)];
Please refer the below link for using LIKE operator in your queryies...
http://salesforcedeveloperblog.blogspot.in/2011/07/like-operator-in-soql.html
Example:
the following query matches Appleton, Apple, and Appl, but not Bappl:
SELECT Id, Name FROM Widget__c WHERE Name LIKE 'appl%'
Thanks
Sandeep