> For the complete documentation index, see [llms.txt](https://documentation.connexica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.connexica.com/reporting/filters.md).

# 03. Filters

## 03b. Filters

Using Filters allows users to build sophisticated search queries that will return more accurate results while allowing ad hoc customisation of reports for both users and \[Report Viewer]\(doc:Technical Documentation.CXAIR.User Guide.7. Report Viewer.WebHome) users. Filter Groups provide a customisable layer of default filters that affect all reports, Indexes or users.

## Filter Groups

There are four filter groups: **Active** filters and **User Defaults** are available to both users and administrators, while **System Defaults** and **Global Report Defaults** are set by administrators.

Filters are applied in the following order: **Active**, **Report**, **System** then **User**.

Filters only overwrite each other when they use the same field. Filters spanning different fields are not affected by the filter order.

{% hint style="info" %}
When a report is loaded, the Active filter group is cleared and instead populated with filters from the saved report. Logging back into the system will reload the previous set of filters.
{% endhint %}

### Active Filters

**Active** filters are session based. They are cached across Indexes and are viewed by clicking **Edit**.

### Global Report Defaults

**Global Report Defaults** are applied to all reports in the selected Index and are set by an administrator. It is applied to reports as soon as they are loaded. Please note that any filters that are added in this group are visible after logging in to the solution.

### System Defaults

**System Defaults** apply to all users once the Index is accessed, and are set by an administrator. Please note that any filters that are added in this group are visible after logging in to the solution.

### User Defaults

**User Defaults** work in the same way as **System Defaults**, but only for a specific user. **User Defaults** are deactivated once an existing report is loaded.

## Editing Current Filter Types

{% stepper %}
{% step %}

### Open the Filter Panel

Open the **Filter Panel** by clicking the **<<** arrows above the **Cog** icon in the \[Query]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2a. Query.WebHome) screen.
{% endstep %}

{% step %}

### Edit filter groups

Click the **Cog** icon next to the current filter drop-down list, then click the **Groups** tab and select **Edit Groups**.
{% endstep %}

{% step %}

### Update the group

Click the **…** icon next to the relevant group to display the current filters it uses.

Once changes are made, click **Save Filter** then **Save Group** to apply the changes. To discard changes, click **Close**.
{% endstep %}
{% endstepper %}

## Configuring Filters

### Creating a Filter

{% stepper %}
{% step %}

### Open Filter Configuration

Open the **Filter Panel** by clicking the **<<** arrows above the **Cog** icon in the \[Query]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2a. Query.WebHome) screen.

Click the **Cog** icon next to the current filter drop-down list to open the **Filter Configuration** options.
{% endstep %}

{% step %}

### Configure the filter

Type a display name in the **Label** textbox. Leaving this blank will result in the system using the field name.

Use the **Group** drop-down list to select where the filter will be applied and the **Index** drop-down list to specify a specific index.

Select the field to be used as a filter from the **Display Field** drop-down list and the type of filter to be used via the **Filter Type** drop-down list. The available options will depend on the type of field that is used and the performance settings specified by the administrator.
{% endstep %}

{% step %}

### Complete the filter

Once all of the required fields have been completed, click **Create Filter** to complete the process.

To discard any changes made, click **Close**.
{% endstep %}
{% endstepper %}

#### Advanced Options

Once the **Filter Type** has been selected, click **Advanced Options** to reveal further configuration options.

* If the **Filter Type** is specified as **Drop-Down List** or **Drop-Down List (Multi)**, the **Context Specific** option will appear. This option ensures that the filter is only populated based on other searches or filters already in place.
  * When the **Context Specific** option is used, the **Include Unselected Filters** option will appear. This option ensures that any filters that are used by FORMFIELD calculations will also impact filters using the **Context Specific** option.
* If the filter type is specified as **Drop-Down List**, **Drop-Down List (Multi)**, **Checkbox** or **Radio Button**, the **Automatic Update** option will appear. This option ensures that the data will be filtered without the user having to click **Filter** once values have been selected.
* Should the filter type be specified as **Drop-Down List (Nested)** or **Drop-Down List (Nested) (Multi)**, the **Nested Display Fields** option will appear. Specify the nested values that will appear as part of the list or, if no selection is made, the filter will default to a standard Drop-Down List or Drop-Down List (Multi) filter.
* When the Filter has been specified as a **Date** or **Date Range**, the **Format Dynamic Date** option is available. This translates a dynamic date to show the actual date for default values. For example, to always display the current date and filter to today's records, enter **TODAY** as a default value and enable this option.
* If the **Filter Type** is specified as **Range**, the **Range Type** option will appear, where an **Inclusive** or **Exclusive** range can be selected. The **Range Display** drop-down list will also appear, providing the option to specify whether the filter fields are **Horizontal** or **Vertical**.
* The **Order** drop-down list, only available when using a **Drop-Down List**, **Droplist (Multi)**, **Radio Button** or **Checkbox**, sets the custom ordering of values within the chosen field.
* To set a default value for the filter, select an option from the **Default** drop-down list.
* To prevent the report from running if a filter value has not been selected, select the **Mandatory** checkbox. Mandatory filters are displayed with a red border.
* The **Ignore** option allows the configuration to be saved but will not activate the filter in the \[Query]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2a. Query.WebHome) screen. The filter will still be available for reporting functionality.
* The **Display as Column** option will result in selected filter values being displayed as an individual column in the \[Query]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2a. Query.WebHome) screen. This allows the selection of one or more values that can be used to display combinations when exporting.
* To add text that describes the filter to other users, use the **Tooltip** textbox.

### Using Saved Queries

It is possible to use saved queries as filters, allowing fast access to different query results using a drop-down list rather than having to load different queries manually.

{% stepper %}
{% step %}

### Select saved queries

Open the **Filter Configuration** window and select **Saved Queries** from the **Choose Filter** drop-down list.

Choose between **Drop-Down List** and **Drop-Down List (Multi)** using the **Choose Type** drop-down list.
{% endstep %}

{% step %}

### Add saved queries to the filter

Click **Select Saved Queries**, tick the required options from the list and click the **Selected Reports** tab.

Review the current selections and click **Add to Filter**.
{% endstep %}

{% step %}

### Create the filter

Click the **Create Filter** button to complete the process.

The filter will then display the saved queries in a drop-down list.
{% endstep %}
{% endstepper %}

### Managing Created Filters

In the **Filter Panel**, click the **Cog** icon next to an available filter and click either **Edit Filter** or **Remove Filter**.

Alternatively, click the **Cog** icon next to the Filter Group drop-down list and click **Edit Filters** to display a list of all currently configured Filters. Click the relevant **...** icon to modify the Filter or click the **X** icon to delete it. To completely remove every currently available Filter, click **Delete All Filters**.

### Configuring Filter Groups

Grouping filters provides users with logical sets to use when reporting.

{% stepper %}
{% step %}

### Create a group

Open the **Filter Configuration** window and click the **Groups** tab.

Use the **Name** textbox to label the new group and click **Add Group** to create it.
{% endstep %}

{% step %}

### Manage groups

Click **Edit Groups** to display the currently configured groups and click the **…** icon to customise the settings for each group.

To delete a created group, click the **X** icon next to the relevant selection.
{% endstep %}

{% step %}

### Select a group

Created groups will appear in the drop-down list of the **Filter Panel**.

Select the group to display the filters that exist within the group.
{% endstep %}
{% endstepper %}

### Applying Filters

Filters can be applied in the \[Query]\(doc:Technical Documentation.CXAIR.User Guide.02. Reporting.2a. Query.WebHome) screen and while viewing reports.

{% stepper %}
{% step %}

### Apply a filter

Open the **Filter Panel**, select the filter values and click **Filter**.
{% endstep %}

{% step %}

### Clear filter values

To remove filter values from the search, click **Clear Filters** or click **Clear** next to the query bar.

Both actions reset the filter to its default values.
{% endstep %}

{% step %}

### Save filter settings with a report

When saving a report, any filters present in the **Filter Panel** will also be saved.

To ensure the **Filter Panel** automatically opens when a report is loaded, click the **Padlock** icon next to the **<<** arrows that open and close the panel. To undo this action, click the locked **Padlock**.
{% endstep %}
{% endstepper %}

### Combining Filters

{% stepper %}
{% step %}

### Locate the report

Click **Load** at the top of the screen and locate the required report.
{% endstep %}

{% step %}

### Combine filters

Click **Combine Filters** and then the **View** button next to the relevant report.

This is not index specific.
{% endstep %}
{% endstepper %}

Combined filters get added to the **Active** filter group.
