Lesson 7: Filtering Data with Queries
Background: Let’s make the DataGrid on the ListIssues view only show open issues. At the same time, let’s add a menu to filter the DataGrid by product.
Note: There’s quite a lot going on in this lesson, but if you follow the steps you’ll see how everything comes together.
- We’re creating a query that we’ll later hook up to the issues DataGrid on the ListIssues view.
- We’re configuring that query to only show open issues.
- We’re also configuring that query to only show issues for a specified product (by using a parameter).
- We’re then defining a parameter that we’ll later hook up to a product menu (Select widget) on the ListIssues view.
- We’re creating another query to populate that product menu.
Here we go…
Create Queries
Use your Queries
Test Drive
Launch your app and test the filter functionality provided by your new queries. The ListIssue view should only show non-Resolved issues, for the product that is selected.
Note: If your ListIssue view is blank, and you’re sure your queries are correctly configured, make sure you assigned a product to all of your issues, and that your issues aren’t all resolved. The query looks for non-resolved issues related to the selected product