---
schema_version: "1"
id: da97e5d5b262c7f63c3a0045a5468a25c9987c1ae04255febffdaf00c007e239
title: TableSortOrder
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/metadata_api/reference/tablesortorder.doc.md
canonical_url: https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/tablesortorder.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: d1c02d665e0e9005dd2741374d83ae68c92b2909e8f2f9910345764baba5ca60
---
_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/v0.0/api/metadata_api/en-us/reference/tableorderfield.doc.html)!  - # Order direction to sort output - direction: [OrderDirection](https://help.tableau.com/v0.0/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/v0.0/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/v0.0/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/v0.0/api/metadata_api/en-us/reference/sheet.doc.html "Sheet - A sheet contained in a published workbook.")