You are here: Reference > Rule types > Data Transforms > Data Transform form - Completing the Definition tab - Sort action

Data Transform form
Completing the Definition tab — Sort action

Usage

Use the Sort action to create custom ordered lists. A typical scenario is you are displaying a multi-column list and you want the columns automatically sorted according to values in one or more of the columns. With the Sort action, you can sort a Page List property according to single-value properties in that Page List. For each single-value embedded property, you can specify sorting in either ascending or descending order of that property. Click the View sorting properties icon to specify the properties on which to sort and the sorting order for each property.

If you specify more than one embedded property to sort on, the first property specified is given precedence at runtime. For example, you want a section to display a list of product items in an order, and the page list is Items, with embedded properties:

And you want to show the user the list of items sorted first by quantity from smallest to largest, and then by total price from highest to lowest within a given quantity. In the Sort By Property window, specify the Quantity property in ascending order and the TotalPrice property in descending order.

At runtime, the displayed rows run from the lowest quantities to the highest, and rows that have the same quantity are displayed with the highest total price first, then the next, and so on.

Relationship settings

The Sort action has no setting for the Relation field.

Supported features

You can use the following items in the Sort action:

Restrictions

You cannot specify a Page Group mode property as the target for the Sort action. That is, you cannot sort by properties in a Page Group mode property.

You cannot sort by properties in the Page List that are not single-value properties. For example, you cannot sort by a Page property in a Page List property.

About Data Transforms