Data filter options on query is disabled

Good Morning,
I have developed a query. Here is the screenshot:

As you can see all filter options are disabled. Under what circumstances are data filters disabled for queries? How can I enable them? It was filtering properly up until this morning. Thank you.

Your query returns zero records. There is nothing to filter.

It seems that the query returned something - deciphering that “something” that was offered as a “screenshot”:

image

Hello,

I left that piece there to show that yes there is data returned. I whited everything out because… I better not show the data. There is total of about 108k records.

Another reason could be that this query is run in direct SQL mode.

1 Like

Hello,

That is the answer. I just checked now. I unclicked the SQL check button:

image

And now I can filter properly. Thank you. Would this be considered a bug? I don’t see how running in direct SQL mode should prevent the output from having filter functions.

As far as I understand the matter, Base can not filter anything. When you filter a record set in parsed query mode, Base modifies the underlying query in some standardized way.
This is not possible when Base does not interprete the SQL by any means. Just adding some condition to the WHERE clause is not guaranteed to work. For the same reason(s) direct SQL does not work with form/subform combinations.

1 Like

Thank you for that elaboration. That will help me to remember when to use SQL direct mode when it is appropriate.

I use direct mode for debugging. It keeps the line breaks and the database engine provides better error messages.

Work-around for the filter button problem: If “Query1” is in direct mode, create another query in parsed mode SELECT * FROM “Query1”. This one will be filterable.