To sort data by one or more fields:
- Add a sort component where required in your package.
- Open the component and name it.
- Add the first field you want to sort by, and define the sort order (ascending or descending).
- If required, add additional fields to sort by and define their sort order.
- Change the field order as required.