Query Filters allow users to narrow down the results of a query.
Add a filter
- Click or drag the Filter button to add a filter that will restrict the records included in the query. If you're using a Local or Slate Template Library query, it will look like this:
- Select the Local Filters check box to display all filters that have been added to the instance.
- Select the Slate Template Library check box to display all available filters within the Slate Template Library, even if they have not been added to the instance.
- Select the Library Filters check box to display filters from any query libraries that you have created or that have been shared with you.
- Select the Extended Filters check box to display filters that are available on any related base, even a join has not yet been added.
Use the Search function to quickly find a desired filter.
- After clicking Continue, configure the filter to restrict query results:
- Click Save and New to add more filters to your query. Otherwise, simply click Save.
Make a filter Active, Active/Pinned, or Inactive. Inactive filters will not be included in the results. See Active/Pinned instructions in the next section.
Matching Rows is the number of rows that will be returned when running a query with this filter. This number is calculated using all existing filters and the new filter configuration.
After clicking Save, a filter box will be added to the query. Further configuration of filters may be done by adding filter logic. Drag and drop the filter boxes into the proper order, add OR and NOT operators, and remember to use parentheses when necessary. For example:
- This filter configuration restricts the query results to only records that have a US Citizenship that also have either a form registration or a verified test score.
Pinned filters allow users to quickly change the selections for a single query run without changing the query itself. This can be helpful can be useful when sharing queries with users who do not have the query permission but may change certain items quickly before running a query.
There are two ways to pin a filter. When adding or editing a filter, you can select the Active/Pinned status.
Active/Pinned filters can have a default setting or not. In this example, there is no default setting for the Staff Assigned filter.
You can also quickly pin a filter by hovering your mouse over the query part and clicking the pin icon.
Setting the status to Active/Pinned or clicking the pin icon will make the filter editable from the Run Query screen:
What about the Pinned check box?
In the past, local queries allowed frequently used exports and filters to be pinned to the top of the Insert Query Part popup window:
Click the Pinned Filters group to display frequently-used filters. Click the Edit Pinned link on the right side of the "Pinned Filters" bar to add frequently-used filters to your Pinned group.
In Configurable Joins queries, you can use query libraries to provide frequently used exports and filters, including subqueries. Libraries can be shared with other users who may have similar querying needs.