Data Set View Filters
Liferay DXP 2024.Q1 U112 Beta Feature
While managing data set views, you can define pre-applied filters to be used in the data set fragment. Although you can set those filters, users can change their parameters anytime.
Adding Filters to the Data Set View
-
Open the Global Menu (
), select the Control Panel tab, and click Data Sets under Object.
-
Click on the Name of the data set you want to access.
Alternatively, click Actions (
) next to the data set entry and select Edit.
-
Click on the Name of the data set view to start editing it.
-
Select the Filters tab.
-
Click Add (
) and choose one of the available options: Client Extension, Date Range, or Selection.
Client Extension Filter
Use a custom filter client extension or deploy a client extension from your workspace to customize the filter experience and add new types of filters to your data set view.
-
Choose Client Extension when adding a new filter.
Each field can be associated with only one filter at a time.
-
Fill in the Name of the filter and, optionally, localize it.
-
Select the Field by which you want to filter the entries.
-
Select the Frontend Data Set Filter client extension and click Save.
Date Range Filter
Use date-type fields to pre-filter the displayed entries.
-
Choose Date Range when adding a new filter.
-
Fill in the Name of the filter and, optionally, localize it.
-
Select the Field by which you want to filter the entries.
Each field can be associated with only one filter at a time.
-
(Optional) Set From and To dates to pre-filter the entries, and the filter shows entries within the specified range.
-
Click Save.
Selection Filter
Use API REST endpoints or picklist options as parameters for the filter.
Start by choosing Selection when adding a new filter.
The Selection filter has three sections: Configuration, Filter Source, and Filter Option.
Under Configuration,
-
Fill in the Name of the filter and, optionally, localize it.
-
Select the Field by which you want to filter the entries.
Under Filter Source,
-
Configure the Filter Source to determine the values offered in the filter. Choose an Object Picklist or an Liferay DXP 2024.Q3+/Portal 7.4 GA132+ API REST Application to associate with the filter.
-
With Object Picklists, choose a picklist to associate with the filter.
-
Liferay DXP 2024.Q3+/Portal 7.4 GA132+ With API REST Applications, select a REST Application, REST Schema, REST Endpoint, Item Key, and Item Label.
TipThe Item Key and Item Label define which fields of the API response are used to build the filter. The Item Key constructs the OData object as a filter parameter, and the Item Label displays the values in the filter UI. Since APIs can return a wide range of data, specifying these fields is crucial for proper integration and data handling.
-
Under Filter Options,
-
Preselect values for the filter.
If you choose the Single selection option, you can only preselect one value.
-
Determine if users can select multiple or single values.
-
Click Save.