Enable sorting for the Print Button
Author:
Yulia Andreyanova
Changed on:
29 May 2026
Key Points
- Configure sorting for any Print Button using the sort property and a matching setting
- Use arrayPath to define which array should be sorted
- Use one or more sorting rules to define sorting priority
- If sorting is not configured, the Print Button behavior remains unchanged

Prerequisites
Steps
Prerequisites
- Ensure the Print Button component is configured in the manifest.
- Ensure the printable document template is already configured using the
`setting`property. - Create a setting that contains the sorting configuration.
Configure the Print Button
`sort` property to the Print Button configuration.The value of the `sort` property must match the name of the setting that contains the sorting configuration.
Configure the sorting setting
`sort` property.Configuration properties
| Property | Type | Required | Default | Description |
`arrayPath` | `string` | no | none | Path to the array that should be sorted. |
`sort` | `array` | yes | none | List of sorting rules. Rules are applied in the order they are defined. |
`field` | `string` | yes | none | Path to the value used for sorting, relative to each item in the sorted array. |
`order` | `string` | no | `ASC` | Sort order. Supported values: `ASC`, `DESC`. |
`type` | `string` | no | `string` | Defines how values are compared during sorting. Supported values: `string`, `number`, `boolean`. |
Multi-field sorting
The following example applies sorting by
`node.groupId` in descending order first, then by `node.classId`, and finally by `node.qty` as a number.Sorting rules are applied in the order they appear in the `sort` array.The following example applies sorting by `groupId` in descending order first, then by `classId`, and finally by `qty` as a number.