Save filter variants in the adaptive list template
To apply and view filters in your adaptive application, you can save filter variants in the Variant dialog of the adaptive list template.
Prerequisites
-
You have an adaptive application made with the adaptive list template that contains fields to filter.
-
You have enabled the variant function, by selecting Settings in the application tree and selecting Enable Variant in the Settings and properties pane.
Procedure
-
Drag and drop one or more data source components, for example,
City
, from the Data Fields pane into the Filter field of the application tree, as your use case requires.Result: In the Preview pane, the data source component is displayed as a search field that searches across all objects for the data source component in the column of the list, for example, for
City
, the objectsBerlin
,Boston
,Copenhagen
, etc. -
In the search field, enter a value that you want to use as a basis for the filter, for example, in
City
, the letterB
.Result: Only the objects are displayed in the list that match the value entered in the search field, for example,
Berlin
andBoston
, but notCopenhagen
. -
Select the Variant button.
Result: The Variant dialog opens. Under Active Filter, the current active filters applied are displayed (for example, the letter
B
as a filter in theCity
field). Under Variants, other custom filter settings variants are listed. -
To create a filter variant with the active filter that is applied, select Create Variant with Active Filter.
-
In Settings, enter a meaningful name and description for the filter variant, for example,
B Cities
andCities that start with the letter 'B'
. The selected field and filter entries are displayed for review. -
If you want your filter variant to be public to view, select Public.
-
Select Create.
Result: You have applied a filter variant and the named filter variant is displayed in place of the Variant button in the Preview pane, for example,
B Cities
. -
If you now select the filter variant
B Cities
, the currently active filter variant has green highlighting under Variants in the Variant dialog.
Filter variant manipulation
In the preview pane, when a filter variant is already applied, you can still
enter other filter values in other search fields of data source components, if
the use case requires. For example, there is also the Country
search field, with
the objects Denmark
, Germany
, United States
.
-
Enter the object
Germany
in theCountry
search field to further modify filter results with a new active filter.Result: A star is displayed next to the named filter variant, for example,
B Cities*
to identify that the filter variant no longer corresponds to the original filter variant applied. -
If you select
B Cities*
, the currently active filter also has orange highlighting under Variants in the Variant dialog. -
Select the Edit Variant icon and do one of the following, depending on your use case:
-
To update the filter variant to include the extra active filter, select Update and Apply.
Result: The filter variant is updated and applied to include the extra active filter variant. In
B Cities
, onlyBerlin
is displayed, sinceBoston
andCopenhagen
are removed from filtering onceGermany
was entered in theCountry
search field. -
To restore the filter variant to the original active filter or active filters from before manual manipulation, or to select another filter variant, select Apply.
Result: Without selection of another filter variant, the filter variant is updated and restored to include only the active or active filters from before manual manipulation. In
B Cities
,Berlin
andBoston
are displayed.
-
Results
-
You have set a filter variant with active filters.
-
You have modified a filter variant to include extra active filters after manual manipulation.