Filtering legacy views
Legacy Studio content
You're currently viewing a topic describing a feature or process based on using legacy views in Studio. Legacy Views are those created using the pre-May 2024 Studio feature set (previously referred to as the general availability feature set). While these views can still be created within Studio, we recommend using the enhanced Studio experience and view editing interface.
For more information, see: Views.
You use filters in legacy views to display data that matches certain criteria. You can either:
Define a filter in the Knowledge Model or View (known as a preset filter); or
Add a filter and select filter options from the View UI (known as a temporary filter)
There are currently three different preset filter types and two temporary filter types. Which type of filter you use will depend on what you want to do and your edit rights.
Note
If you want to define, add or edit a preset filter, you'll need edit rights for the package that contains the Knowledge Model and View. For more information, see permissions in Studio. If you don't have edit rights, use temporary filters in your View.
Legacy view filter types and uses
Type | Filter | Where you add the filter | What it filters | Key points | Visibility and editability |
---|---|---|---|---|---|
Preset | View | In a View. | A specific View. | Applies filters and filter settings:
|
|
Preset | Component | In a View. | A specific component in a specific View. | Applies filters and filter settings:
|
|
Preset | Global | In a Knowledge Model TipFor more information about Knowledge Model filters, see Filters. | All Views built using that Knowledge Model. | Applies the same filters and filter settings:
|
|
Temporary | On the View UI. | A specific View using:
| Click the UI to apply and edit multiple filters in your View. |
| |
Temporary | On the View UI. | A specific View with:
| Click the UI to apply to a component and the rest of the View. |
|
Note
User permissions are stored in Data Models. If you want to filter using user permissions, do this directly in the relevant Data Model.
Adding a preset legacy view filter
Open a View in Studio.
Open Visual Editor.
Select Filter > Add Knowledge Model Filters.
Select:
Create Filter if you want to create a filter from scratch; or
An existing filter displayed here as a basis for your new filter
Complete the fields in the Create Filter screen.
Select Save.
Making legacy view filters visible and editable
Open the View in Studio.
Open Visual Editor.
Hover over the filter you want to edit.
Click .
Select/deselect the Hide from user and Read-only for user options.
Note
If you want users to be able to temporarily turn the filter off, select both Hide from user and Read-only for user here.
Select Save.
Adding a global filter for legacy views
Open the Knowledge Model in Studio.
Open the Visual Editor.
Select:
Create Filter if you want to create a filter from scratch; or
An existing filter displayed here as a basis for your new filter
Complete the fields in the Create Filter screen.
In Filter Settings, toggle Global Filter to on.
Select Save.
Persisting filters between legacy views
If you want user filters to be retained when they move between Views, you'll need to configure the Button component. For more information, see OnClick button configuration.
Adding conditional filters to legacy views
You can add a filter that will filter components once a specific action has been performed, such as selection of a KPI. In this example, you can check if your VARIABLE has an expected value then apply a Knowledge Model filter.
id: ${ (VARIABLE === 'EXPECTED_VARIABLE_VALUE' && 'KM_FILTER_ID')} or id: ${(VARIABLE === 'EXPECTED_VARIABLE_VALUE1' && 'KM_FILTER_ID1') || (VARIABLE === 'EXPECTED_VARIABLE_VALUE2' && 'KM_FILTER_ID2') || (VARIABLE === 'EXPECTED_VARIABLE_VALUE3' && 'KM_FILTER_ID3') || (VARIABLE === 'EXPECTED_VARIABLE_VALUE4' && 'KM_FILTER_ID4') || 'KM_FILTER_FALLBACK'}