Wild card searching using DataWindow

Wild card searching using DataWindow

I tried to place wild-card (e.g. ‘%Ken%’) for the searching of records in a DataWindow through QueryMode, but couldn’t get the result. Are there any other ways to do the searching?

The best way to do searching in a DataWindow is by using the find command. The find command lets you embed most of the datawindow functions that you can normally use in an expression painter.

Therefore you can use two very powerful commands to achieve the result you are looking for. These are mainly POS and MATCH. With Pos you could say:

dw_1.Find( "Pos( name, 'ken' ) > 0", 1 , dw_1.RowCount() )

To match any case you can use:

dw_1.Find( "Pos( Lower( name ), 'ken' ) > 0", 1 , dw_1.RowCount() )

If you want to get very sophisticated, you can use the Match function which provides for wildcards, character ranges and many other features.

See also  Small Business Strategies with Venmo

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist