Filtering Query Results
Overview
When you have hundreds (or even thousands) of rows returned, it is important to have user friendly, efficient tools to filter and navigate your data. A typical way to add filters (conditions) to SQL statements is to manually create and adjust SQL over and over - but this wastes valuable time, and increases the risk of error every time the SQL is changed!
Andi provides dynamic sorting and filtering features to help quickly narrow down to the desired results, helping to dramatically speed up the time it takes to locate specific data. One or multiple column filters can be added to dynamically filter out rows, and each filter can be disabled or removed if results are not as expected.
Note: The Filter Designer is used to customize and dynamically create a filter which can be added to the Filter Editor. The Filter Editor is used to disable / enable / remove already designed and created filters (administration of filters).
Quick Filter (Hotkey) and Filter Values
Quick Filter
Andi provides many different hotkeys within its application that can save you time, and make navigation and manipulation of data even easier! The Quick Filter Hotkey is available to quickly filter down to just the desired records. This method is recommended for simple filtering needs, and the Filter Designer should be used for more specific filtering.
In the example below, the last names "HARTMAN", "POLLARD", and "CURTIS" have been selected.
By entering CTRL-Q, Andi will filter out all other rows that do not contain Hartman, Pollard, and Curtis as a Last Name:
Note: For a full list of Andi Hotkeys and shortcuts, reference the article Andi Hotkeys.
Filter Values
To view a list of available Filter Values for a particular column, right mouse click on an individual column, and select the menu option Filter Values:
A list of available values that can be used to filter the selected column will appear. Check the desired values, and Andi will filter to those results:
Filter Designer
Accessing the Filter Designer
The Filter Designer provides user friendly, dynamic filtering for Query Results. To access the Filter Designer select the blue filter icon:
To begin filtering, select any cell within a column. This will automatically fill in the Filter for Column value with the associated column name:
Equals To (=) or Not Equals To (!=)
Before dynamically filtering data, select an option for Equals To (=) or Not Equals To (!=) from the menu to ensure the right data results are returned:
Dynamically Filter Data (Filter Value)
To begin dynamically filtering data, simply type in a Filter Value. The Query Results will update dynamically as the value is typed:
Adding Multiple Filters to a Column
The Filter Designer can add a single dynamic filter, or multiple filters can be added to work together. The Inactive / Active Filters allow users to decide which filters should be Active to dynamically update data results.
As an example, Louis has been added as an Inactive Filter by selecting the Add Inactive button. Then, Bruno is entered as a Filter Value and the Add Inactive button is selected:
Both Inactive filters can now be added to the Active filters by using the right arrows:
The filter will dynamically take effect to the data results for viewing as soon as the filters are set Active. Filters can be updated back and forth between Inactive and Active, and the column will automatically update.
To save this Filter, simply select "Apply Filter" and it will be available for viewing and editing in the Filter Editor:
Filter Designer Menu
There are many options to select from that impact how the Filter Designer will function. These options are available from the Filter Designer menu:
Filter Group
The Filter Group menu will set the Active filters to use And / Or operators:
Apply Options
The Apply Options menu will shift the Filter Value from Dynamic to Manual. By setting this option to Dynamic, any value entered as a Filter Value will dynamically update the data results in Andi. If set to Manual, the filters must be added to the Active filter list before they will apply to the data results:
Case Sensitivity
The Case Sensitivity menu allows for Insensitive (Uppercase or Lowercase accepted) or Sensitive (must match exact character):
Match Options
The Match Options menu is available to bring back data results that are a Partial match, Regular Expression, or None:
Filter Editor
The Filter Editor tab (located under the Query Editor) will display all Inactive and Active filters that are currently in use. This is a user friendly way to organize and manipulate multiple filters from one central location.
The below example shows the currently Active filter (marked by a green check mark) for only displaying rows that include Louis or Bruno as the First_Name:
Disable / Enable / Remove / Remove All Filters
Filters can easily be disabled, enabled, a single filter removed, or all the filters removed from the Filter Editor. Simply right mouse click on the filter to view and select from these options:
When a filter is disabled, a red X will appear next to the filter to visually identify it as disabled:
Filter Menu Options
The following options are available from the Filter Menu, and work in conjunction with the Filter Editor:
Enable When Adding
Quick Add
All - Enable, Disable, Remove
Enable When Adding
The Enable When Adding option when selected will immediately enable and apply Filters that are created to the Query Results. By disabling this option, Filters will be added to the Filter Editor for viewing, but will not automatically enable or start to filter the data until enabling from the Filter Editor. This feature helps to keep data visible while applying multiple filters.
Quick Add
The Quick Add menu option functions the same as the Andi Hotkey for Quick Filter, CTRL+Q. By selecting a desired value to use as a filter from a column, and then selecting Quick Add from the Filter menu, it will automatically add the new filter for viewing in the Filter Editor.
All - Enable, Disable, Remove
The options to Enable all filters, Disable all filters, or Remove all filters (whether enabled or disabled) from the Filter Editor is available.