Managing Data Sets

Liferay DXP 2024.Q1+/Portal 7.4 GA112+

Beta Feature

Once you create a data set, you can customize how users see it. Choose which fields appear, define and pre-apply filters, set default sorting rules, redirect users to a different URL where they can perform actions, and configure pagination options for your data set.

Managing Data Set Layout and Settings

The Data Set application is divided into tabs:

  • Details tab: see and edit the name (1) and description (2) of your data set. Click Save once the alterations are complete.

    You can also see the information about the REST Application, Schema, and Endpoint (3) used with that data set.

    In the Details tab, edit the name and description of your data set.

  • Liferay DXP 2024.Q2+/Portal 7.4 GA120+ Visualization Modes tab: select fields and manage how they appear in your data set using three different visualization modes: Table, List, and Cards.

    Edit the fields, add friendly labels and localize them, choose a renderer for the fields, and define them as sortable or not sortable.

    You can also customize the list and the card visualization modes by mapping their elements to fields from your data set.

  • Filters tab: define filters that users can apply to the data set fragment.

    You can apply customized filters using Client Extensions, use date-type fields and show entries within a given period, or configure Picklists as the source of the options for the filter.

  • Liferay DXP 2024.Q3+/Portal 7.4 GA125+ Sorting tab: set sorting options that are applied to the entries once the user visits a page with a Data Set fragment. You can also set a default sorting option.

    Sort entries using a specific field as a criterion and in ascending or descending order.

  • Liferay DXP 2024.Q2+/Portal 7.4 GA120+ Actions tab: create actions linked to the elements in the data set.

    With Item Actions, you can perform many actions related to items in the data set, depending on the specific needs and context of the data. For example, if a data set item represents a user, possible actions include activating/deactivating it or impersonating it. Similarly, for a web content item, actions could include expiring content or viewing its history and usage.

    With Creation Actions, users can create new data or you can redirect them to a different location where they can create it.

    See Using Data Set Actions for more information.

  • Pagination tab: configure the pagination options for the data set. Pagination divides a large set of data into smaller, more manageable parts.

    Set a default number of items per page and provide users with a list of options from which they can select their preferred number of items to display on each page.

    Use positive numbers separated by commas to define the list of options.

    In the Pagination tab, set a default number of items per page and add a list of defined values from which users can select their preferred number of items to display on a page.

  • Settings tab: configure your data set (e.g., set a default visualization mode).

    In the Settings tab, you can configure your data set.

Adding Advanced Parameters to a Data Set

In the Advanced Optional Parameters section, enter a string of parameters in the Parameters field to add them to the request URL when showing the data set. You can enter any parameters that are compatible with the endpoint, including nestedFields, filter, and sort parameters. These parameters are used by default when the data set is shown.

The URL Preview field below shows what the resulting URL is after adding your parameters.

Note

Your parameters must both be appropriate for your chosen endpoint and use correct syntax. If you add an unsupported or incorrect parameter, rendering the data set returns an error and no results from the data set. See API Query Parameters for more information on API query parameters.

Set parameters in the Parameters field, then check the result with the read-only URL Preview field.

If you’ve configured fields, filters, or sorting criteria in the other tabs that may conflict with these parameters, those configurations are accounted for in the request URL, following these rules:

  • nestedFields parameters: if a parameter adds a field already included with a field mapped in the Visualization Modes tab, it is not re-added to the URL to avoid duplicated fields.

  • filter parameters: if you’ve added a filter both in the Parameters field and in the Filters tab, the filters are joined together with an and operator.

  • sort parameters: if a sorting criteria is configured in the Sorting tab for the same field, it overrides the criteria in the Parameters field. Sorting criteria added in the Sorting tab are added to the final URL before the criteria in the parameters.

For example, if you have a data set of users with their familyName field set as a filter in the Filters tab, and you add filter=givenName eq 'Firstname' to the Parameters field, this URL is shown by default:

/headless-admin-user/v1.0/user-accounts?filter=givenName%20eq%20'Firstname'

If a user viewing the data set enables the familyName filter for the last name Lastname, the URL then joins the two filters together for the resulting filter, (familyName eq 'Lastname') and (givenName eq 'Firstname':

/headless-admin-user/v1.0/user-accounts?filter=%28%28familyName+eq+%27Lastname%27%29%29+and+%28givenName+eq+%27Firstname%27%29%

Relevant Topics

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy