Overriding the filter method

Hello everyone, I was wondering what method is invoked when the user filters a field on a form datasource that i could override, i have tried overriding the method filter on both the datasource and the control of that datasource but they are never invoked when debugging, any suggestions ?

Filtering the data means that a range is added to a data source’s query and the query gets executed to fetch the data in database. To run the query, the data source has a method called executeQuery(). If you look into the application, you’ll find executeQuery() overridden in many forms.

hello martin thanks for the reply, is there a way i could get the value entered to filter the field through the executequery method?

The filters are implemented either as query ranges or filters.

Query ranges are instances of QueryBuildRange class and you can get them by calling findRange() method of the query build data source.

Query filters are instances of QueryFilter class and you can get them by calling findQueryFilter() of the query.

When you have the object, call its value() method to get the actual filter value.

In some cases, there may be more than one filter for the same field.

If you don’t know how to get a QueryBuildDataSource object for the form data source in executeQuery(), simply call this.queryBuildDataSource() method.

If you have other question about how to work with queries, please create a new thread for that, because this thread is about something else.

hey martin, thanks for the reply, it finally worked!

using the findQueryFilter() method of the queryRun() query i managed to get the value the user is trying to filter with.

my problem was i was getting all the coded filters but not the filters that the user is using.