--- title: "Define sorting" slug: "define-sorting" tags: ["Task topic"] updated: 2026-03-20T07:55:00Z published: 2026-03-20T17:44:19Z canonical: "docs.staedean.com/define-sorting" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Define sorting For internal documents and **ODBC** documents, you can define the order in which the data in the record is queried and processed during export or import. For example, to export sales orders, you want the sales order to be queried by customer and for each customer by delivery date. To do so, on the **Sorting** tab, add a record for both the **CustAccount** field and the **DeliveryDate** field, in this sequence. ### Steps 1. Click **Connectivity** **studio - Integration Design**. 2. Click the **Documents** tab. 3. In the list, find and select the desired internal or **ODBC** document. 4. Click **Edit**. 5. In the **Record** section, in the **Record** list, find and select the desired record. 6. Click the **Sorting** tab. 7. Click **New**. 8. Set the record field based on which you want to sort the data. In the **Record** **field** field, enter or select a value. > [!NOTE] > **Note** > > You can only enter a sorting for a field that is also defined in the record fields. 9. Define the order in which the data must be sorted. In the **Order** field, select an option. 10. Close the page. ## Related - [Create separate files](/create-separate-files.md) - [Manage document record setup - ODBC documents](/manage-document-record-setup-odbc-documents.md) - [Manage document record setup - Internal documents](/manage-document-record-setup-internal-documents.md)