using FindMatches--ignoring case

Posts   
 
    
LLBLGen
User
Posts: 43
Joined: 10-Apr-2006
# Posted on: 31-Mar-2008 16:11:36   

Is there a way to ignore the case when using FindMatches ? for example if i want to find all the collection that has the state code of "TX" or "tx".

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 03-Apr-2008 10:25:47   

I've never used FindMatches, but would using a FieldLikePredicate work?

Gab.

Sire404
User
Posts: 17
Joined: 21-Mar-2005
# Posted on: 18-Apr-2008 15:37:33   

LLBLGen wrote:

Is there a way to ignore the case when using FindMatches ? for example if i want to find all the collection that has the state code of "TX" or "tx".

Yes:

PredicateExpression filter = new PredicateExpression(); FieldCompareValuePredicate filterName = new FieldCompareValuePredicate(ParticipantFields.Name, ComparisonOperator.Equal, name); filterName.CaseSensitiveCollation = false; filter.Add(filterName);

Only FieldCompareValuePredicate and FieldLikePredicate support this flag, unfortunately.