Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

How to have a default filter active?

BobK

Here is my understanding of how a filter on a query works.

A query is run and all of the rows that match the query are returned.
One or more columns have a filter and the user uses a filter
Only the records that match the filter are now displayed.

I assume the a second call to the database was not used and the records that did not match the filter are still in memory.

The user removes the filter.

All of the records are again displayed with out needing to make another call to the database.

If any of the above is incorrect, I guess I will not be able to do what I want and will have to settle for multiple calls to the database.

What I want to be able to do:
Run a query that returns multiple records but have a filter active so only certain records are initially displayed to the user.
If the user wishes to see all of the records, they just remove the filter and all of the records display without another call to the database.

Is that possible and how do I do it?

Thanks.


Jaymer

Bob, as to the final line in your post, I don’t know how to do that.
But you can be assured that you’re re-hitting the database after a filter change.
To see these exact “happenings “, it’s very easy.
Just view the network tab on the chrome Inspector and you can see each Interaction with the server… what it’s sending to the server, and what gets returned in XML.


BobK

Thanks Jaymer.

Not what I wanted to hear, but it is what it is.


aware_support

You can give Value List filters a try if you can (these are new filters introduced in 9.0). These filters have an option whether to initially display as "selected" or not.


BobK

aware_support wrote

You can give Value List filters a try if you can (these are new filters introduced in 9.0). These filters have an option whether to initially display as "selected" or not.

Thanks support, that sounds like just what I need.

Except, either I am doing something wrong or there is a bug in this option.

Using the sample application "IssueResolution" and the query "Issue - all", I set the "initially selected" to 'No' for "Closed" issues. See the image

When I run the query, the "Closed" button is inactive, but Closed Issues are still appearing in the results:

Since the "Status" is not one of the displayed columns, it is hard to tell, but those displayed issues are all "Closed"


aware_support

The buttons displayed by the filter should initially reflect the original query. Since the original query returns all issues the state of the Closed button should be selected. You cannot change it to unselected unless you change the query as well.

Aware IM is not yet smart enough to analyze the query, set filter buttons accordingly and disallow the developer to change them. Hence you are currently allowed to change the initial state, but ideally you shouldn't be.