Data Set Sorting
Liferay DXP 2024.Q1/Portal GA112
Currently, this feature is behind a release feature flag (LPS-164563).
While managing data sets, you can set default sorting rules for Data Sets displayed in Data Set fragments.
Adding Sorting Options to the Data Set
-
Open the Global Menu (
), select the Control Panel tab, and click Data Sets under Object.
-
Choose the Name of the data set you want to access.
Alternatively, click Actions (
) next to the data set entry and select Edit.
-
Select the Sorting tab.
-
Click Add (
) and enter the information in the modal window that opens.
-
Enter the Label for the sorting option and, optionally, localize it.
-
Choose a field to be used for sorting.
-
Check Use as Default Sorting to set it as the default sorting option.
-
(Optional) Use the drag icon (
) to reorder the sorting options.
After configuring the sorting options, data sets are sorted automatically in Data Set fragments according to the options you set.
Activating and Deactivating Sorting Options
Liferay 2025.Q2+/Portal GA135+
You can also activate or deactivate your sorting options via the buttons in the Status column. When a sorting option is inactive, it no longer appears for users until you reactivate it.
Deactivate sorting options instead of deleting them so you can reactivate them again later if needed.
Using Sorting Options in a Fragment
Open the Order drop-down to choose other sorting options and specify whether the items are ordered in ascending or descending order.
Alternatively, you can use the arrows next to the fields to sort. The up arrow indicates ascending order, while the down arrow indicates descending order.