---
schema_version: "1"
id: cd24f273ddfe4d97175487583dd474df6d320148c5efda153d7e4d8b0210eac0
title: TableSortOrder
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/metadata_api/reference/tablesortorder.doc.md
canonical_url: https://help.tableau.com/current/api/metadata_api/en-us/reference/tablesortorder.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: f055945abf849004514307ec1ff72cbb865e8f8a77cae03d2677a4b13d93d201
---
_menu_ Types

INPUT\_OBJECT

# TableSortOrder

Sort by given fields. The sort orders defined first in the list will take priority. If there are no given sort orders or a tie on the final sorted field then the resulting set will be sorted by ID in ascending order.

## [_link_](#graphql-schema-definition) GraphQL Schema definition

`   - input TableSortOrder {  - # GraphQL field to sort on - field: [TableOrderField](https://help.tableau.com/current/api/metadata_api/en-us/reference/tableorderfield.doc.html)!  - # Order direction to sort output - direction: [OrderDirection](https://help.tableau.com/current/api/metadata_api/en-us/reference/orderdirection.doc.html)! - }   `

## [_link_](#require-by) Require by

- [Dashboard_A dashboard contained in a published workbook._](https://help.tableau.com/current/api/metadata_api/en-us/reference/dashboard.doc.html "Dashboard - A dashboard contained in a published workbook.")

- [Lens_Lenses are curated, embeddable Ask Data experiences. \*Introduced in Tableau Cloud June 2022 / Server 2022.3.\* \*Retired in Tableau Cloud February 2024 / Server 2024.2.\*_](lens.doc.html "Lens - Lenses are curated, embeddable Ask Data experiences.  
    *Introduced in Tableau Cloud June 2022 / Server 2022.3.*  
    *Retired in Tableau Cloud February 2024 / Server 2024.2.*")

- [Query_Query root for Metadata GraphQL interface_](https://help.tableau.com/current/api/metadata_api/en-us/reference/query.doc.html "Query - Query root for Metadata GraphQL interface")

- [Sheet_A sheet contained in a published workbook._](https://help.tableau.com/current/api/metadata_api/en-us/reference/sheet.doc.html "Sheet - A sheet contained in a published workbook.")