Board index » delphi » how to filter substring ?

how to filter substring ?

Hi there,
How to filter a field string equal to a substring through filter
property in a table component? For example
a CITY field in a data set contains [Battle Creek, Mill Creek. Stann
Creek District, Ann Arbor]
What is the filter expression to filter CITY that contain 'Creek' ?

What wild character(s) that can be applied to filter expression other
than '*' ?

Thank you.

Ariana

 

Re:how to filter substring ?


On Tue, 27 Jul 1999 13:46:45 -0700, "Diwan P. Ariana"

Quote
<arian...@pilot.msu.edu> wrote:
>Hi there,
>How to filter a field string equal to a substring through filter
>property in a table component? For example
>a CITY field in a data set contains [Battle Creek, Mill Creek. Stann
>Creek District, Ann Arbor]
>What is the filter expression to filter CITY that contain 'Creek' ?

>What wild character(s) that can be applied to filter expression other
>than '*' ?

>Thank you.

>Ariana

You can't do it that way. You'll have to write a custom filter event
handler (OnFillterRecord) where you test for the existence of the
substring and set the Accept variable accordingly.

Steve F (Team B)

Re:how to filter substring ?


Quote
>How to filter a field string equal to a substring through filter
>property in a table component? For example
>a CITY field in a data set contains [Battle Creek, Mill Creek. Stann
>Creek District, Ann Arbor]
>What is the filter expression to filter CITY that contain 'Creek' ?

There isn't one.  You need to write your own OnfilterRecord event handler to
handle this.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads