Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread foCaseInsensitive??
Sat, Nov 16 2019 3:52 PMPermanent Link

Ian Branch

Avatar

Hi Team,
I am obviously doing something wrong here..
EDBTable, VARCHAR field 'Name'.
EDBTable.Filter = Name like 'roy%'
FilterOptions|foCaseInsensitive is False.
When I set Filtered to True I get all records starting with 'Roy', not 'roy' as wanted.
The field Name has an index however it isn't flagged as case-insensitive.
It doesn't matter what the setting of FilterOptions|foCaseInsensitive  is I get the same result. Frown

Thoughts/suggestions appreciated.

Regards,
Ian
Sun, Nov 17 2019 3:51 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian

I have all my VARCHAR fields set to case insensitive so this is a guess

Filters such as LIKE are an ElevateDB extension and since you have an index defined that is being used and the foCaseInsensitive is being ignored.

You can try

_Name collate ansi_ci like 'roy%'

but that will not use the index.

The best recommendation, unless you need case sensitivity is to set all VARCHARs and CHARs to case insensitive. It does affect sorting, (ie roy and ROY will be sorted together) but in a way that more users seem to expect.

Roy Lambert
Sun, Nov 17 2019 3:29 PMPermanent Link

Ian Branch

Avatar

Hi Roy,
Thanks for the info.

Roy Lambert wrote:

Filters such as LIKE are an ElevateDB extension and since you have an index defined that is being used and the foCaseInsensitive is being ignored.

IB - Oh.  I didn't consider/realize that.  Hmmm.  Have to rethink some things.

The best recommendation, unless you need case sensitivity is to set all VARCHARs and CHARs to case insensitive. It does affect sorting, (ie roy and ROY will be sorted together) but in a way that more users seem to expect.

IB - As it turns out this particular Customer prefers case insensitive searches so it turned out OK.  Having said that I would still like the option to work.  Sigh.

Regards,
Ian
Mon, Nov 18 2019 3:22 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


Report it to Tim - see what he says.

Roy Lambert
Image