function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
a contratora contrator 

picklist query

Hi experts:

 

For regular picklist (which is not a multiselect picklist),  'like' or 'includes' is not valid in the SOQL query.  So how to implement the similar feature to query the picklist field in a SOQL ?

spraetzspraetz

Like should still work.

 

I just got this to work in a test org with a regular picklist:

 

List<Customobject__c> cos = [SELECT id, name, picklist__c FROM CustomObject__c WHERE picklist__c like '%aa%'];
System.debug(cos);

 

are you using % before/after your phrase as wildcards?

a contratora contrator

ok.  the reason is my sForce explorer is not up-to-date  :)