AX1693
Filter Library
You can create filter criteria statements and save them to the Filter Library, so that commonly-used filters are stored in a centralized location. Once a filter is saved to the Filter Library, you can reuse it in various areas of the software, such as in reports or security.
Filters can be saved or reused by using the Filter Wizard dialog. Once you have created a filter in the Filter Wizard that you would like to store for reuse, you can save it to the library from the dialog. To reuse a filter, you can open the Filter Wizard and load a saved filter from the library, then apply that filter to the current context of the Filter Wizard.
Example Filter Wizard dialog with buttons to load and save filters
For example:
-
If you are in a report with an AdvancedFilter refresh variable, you can use that Filter Wizard dialog to load a saved filter instead of creating a new one. When you apply the refresh variables, that filter is now applied to the report.
-
If you are configuring security for plan files in a particular file group, you can launch the Filter Wizard to load a saved filter, and then apply that filter to the file group.
You can configure user access to the Filter Library like other libraries in Axiom Software. Users can have read-only access to certain filters in order to load and use the filters, or they can have read/write access to edit filters and save new filters.
There are two types of filters that you can save to the Filter Library:
- Standard filter criteria statements (for use throughout the system)
- Limit query statements (for use in the advanced setting of Axiom queries: Limit query data based on another table)
However, currently the type of filter is not stored on the saved filter, so there is no way to know what type of filter it is until you load it. For this reason, if you are storing both types of filters, it is recommended to create subfolders and/or use naming conventions to indicate which filters are limit query statements as opposed to standard filter criteria statements. For example, you can prefix all saved limit query statements with "Limit_" and/or you can save all limit query statements in a subfolder named "LimitQuery".
Saving a filter to the Filter Library
You can save a standard filter criteria statement to the library from any instance of the Filter Wizard. You can also right-click the Filter Library and select New > Filter to launch the Filter Wizard for purposes of creating a filter that you want to save.
Once you have used the Filter Wizard to create the filter, click the save icon at the right side of the Filter box. You can define a name for the filter, and save it to any location in the Filter Library where you have read/write permission (or to My Documents if applicable). If you do not have permission to save a filter anywhere, then the save icon is grayed out and unavailable.
Limit query statements can only be created and saved when the Filter Wizard is launched from certain features. This includes the ShowFilterWizardDialog function, the AdvancedFilter refresh variable, and the Filter Wizard command adapter for Axiom forms. These features all allow you to configure the dialog to build a limit query statement instead of a standard filter criteria statement. Once the filter is created, the process of saving the filter to the library is the same.
Loading a filter from the Filter Library
You can load a filter from the Filter Library into any instance of the Filter Wizard (using advanced view). To load a saved filter into the Filter Wizard, click the folder icon at the right side of the Preview box to select any filter that you have access to in the Filter Library (or My Documents if applicable). If you do not have at least read-only access to any location where filters can be stored, then the save icon is grayed out and unavailable.
When you load a filter into the Filter Wizard, the filter is placed in the Preview box, overwriting any existing filter in the Preview box. You can then review the filter as needed before moving it down to the Filter box and applying it to the current filter context.
When you load a filter, the filter criteria statement from the Filter Library is copied into the Filter Wizard so that you can use it in your current task. The filter loaded in the Filter Wizard is no longer associated with the saved filter in the Filter Library. If you update the filter in the Filter Library, this does not affect any of the locations where the filter was loaded and used. The Filter Library is just a convenience so that you do not have to re-create the filter from scratch every time that you want to use it.
NOTE: When loading filters, the list of saved filters is not limited based on filter type. It is possible to load a standard filter criteria statement into a context where you are expecting a limit query statement and vice versa. This is why it is recommended to use a naming convention and/or separate subfolders to store the different filter types, so that users can choose the appropriate type for the current context.
Editing a filter in the Filter Library
You can edit a filter in the Filter Library using any instance of the Filter Wizard (using advanced view). To edit an existing filter, create the new version of the filter in the Filter Wizard, and then use the save process to save over the existing file name. For example, a typical edit process is as follows:
-
Load the saved filter into the Filter Wizard so that you have a starting point for edits. Note that this step is not necessary—you can also just create a filter from scratch (or using some other saved filter) and save it over the existing filter.
-
Move the filter into the Filter box and edit it as necessary.
-
Save the filter using the same file name, so that the new filter overwrites the existing saved filter. Note that you must type in the correct file name; the name is not assumed.
You can also double-click a filter file in the Filter Library in order to open it for editing. This launches the Filter Wizard with the selected filter automatically loaded into the Filter box. When you save, the file name is automatically populated into the Save As dialog.
NOTE: When you open a filter file directly from the Filter Library, the Filter Wizard dialog is always the standard dialog for purposes of creating a standard filter criteria statement. If the loaded filter is a limit query statement, then you can manually edit the statement in the Filter box, but you cannot use the dialog to create a new limit query statement or modify the existing one. The only way to edit a limit query statement using the specialized Filter Wizard dialog is to launch the dialog using the same features that support creating new limit query statements (ShowFilterWizardDialog function, AdvancedFilter refresh variable, and Filter Wizard command).
IMPORTANT: Remember that editing the filter in the Filter Library only impacts the saved filter file. If the saved filter has been loaded and used in various locations in the software, those used filters are not tied to the Filter Library and remain unchanged. The edits made to the Filter Library only impact future use of the filter.
Deleting a filter in the Filter Library
You can delete a filter in the Filter Library at any time if you have read/write permission to the folder. Once you have deleted the filter, it is no longer available for future use, but any filters in the software that were created based on the saved filter remain unchanged.
To delete a filter, use the Explorer task pane or Axiom Explorer. It is not possible to delete a saved filter from within the Filter Wizard.