Previous Next JavaScript must be enabled to correctly display this content

## 18.5.8.4.3 Data Ordering

Learn about how the APEX delegates data ordering.

The APEX engine delegates data ordering an end-user can perform to the BOSS REST endpoint for server-side execution.

In addition, as necessary when defining a region based on a BOSS REST Data Source, you can specify an External Order Bys clause. Its syntax is a comma-separated list of one or more case-sensitive attribute names, each suffixed by `:asc` for ascending order or `:desc` for descending order. For example, the following external order bys expression would sort ascending by department number and then descending by date hired:

`departmentNumber:asc,dateHired:desc`

Note that an attempt to order by a BOSS attribute that is not configured to be sortable will result in a runtime error from the REST API. If you need to sort on a non-sortable attribute, this can be done by using the APEX Local Post-Processing feature that all REST Data Sources have available to use.

Parent topic: BOSS REST Data Source Runtime Features