---
schema_version: "1"
id: 85ed9744fb63ae05427f79acd7ea9f2b388f9253f2fddf6c45811f24a4ef61cf
title: FieldSortOrder
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/metadata_api/reference/fieldsortorder.doc.md
canonical_url: https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/fieldsortorder.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: 018d2f5cfa98c2cd7f45d5d6a2fd3f7b68c5a040a829aedb2648faedfbbad320
---
_menu_ Types

INPUT\_OBJECT

# FieldSortOrder

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 FieldSortOrder {  - # GraphQL field to sort on - field: [FieldOrderField](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/fieldorderfield.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

- [BinField_GraphQL type for a binned continuous measure field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations\_bins.html_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/binfield.doc.html "BinField - GraphQL type for a binned continuous measure field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_bins.html")

- [CalculatedField_GraphQL type for a calculated field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations\_calculatedfields.html_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/calculatedfield.doc.html "CalculatedField - GraphQL type for a calculated field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields.html")

- [Column_GraphQL type for a table column_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/column.doc.html "Column - GraphQL type for a table column")

- [ColumnField_ColumnFields are a type of field which directly connects to a column in some type of table._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/columnfield.doc.html "ColumnField - ColumnFields are a type of field which directly connects to a column in some type of table.")

- [CombinedField_GraphQL type for a combined field. Combined fields concatanate fields together into one string._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/combinedfield.doc.html "CombinedField - GraphQL type for a combined field. Combined fields concatanate fields together into one string.")

- [CombinedSetField_GraphQL type for a combined set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup\_sets\_create.html#Combine_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/combinedsetfield.doc.html "CombinedSetField - GraphQL type for a combined set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.html#Combine")

- [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.")

- [Datasource_Root GraphQL type for embedded and published data sources Data sources are a way to represent how Tableau Desktop and Tableau Server model and connect to data. Data sources can be published separately, as a published data source, or may be contained in a workbook as an embedded data source. See https://onlinehelp.tableau.com/current/server/en-us/datasource.htm_](datasource.doc.html "Datasource - Root GraphQL type for embedded and published data sources
    Data sources are a way to represent how Tableau Desktop and Tableau Server model and connect to data. Data sources can be published separately, as a published data source, or may be contained in a workbook as an embedded data source.
    See https://onlinehelp.tableau.com/current/server/en-us/datasource.htm")

- [DatasourceField_GraphQL type for a data source field. Data source fields can only exist in embedded data sources which connect to a published data source. A data source field is an embedded data source's 'layered' representation of a field that already exists in the published data source and is mostly a copy of the field in the published data source. Data source fields can get their own descriptions and renames local to the embedded data source, but cannot otherwise be modified in the embedded data source._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/datasourcefield.doc.html "DatasourceField - GraphQL type for a data source field. Data source fields can only exist in embedded data sources which connect to a published data source. A data source field is an embedded data source's 'layered' representation of a field that already exists in the published data source and is mostly a copy of the field in the published data source. Data source fields can get their own descriptions and renames local to the embedded data source, but cannot otherwise be modified in the embedded data source.")

- [EmbeddedDatasource_A data source embedded in a workbook_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/embeddeddatasource.doc.html "EmbeddedDatasource - A data source embedded in a workbook")

- [Field_Base GraphQL type for a field_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/field.doc.html "Field - Base GraphQL type for a field")

- [FieldReferencingField_Base GraphQL type for a field that references another field. For example, a CalculatedField can reference a ColumnField in its formula._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/fieldreferencingfield.doc.html "FieldReferencingField - Base GraphQL type for a field that references another field. For example, a CalculatedField can reference a ColumnField in its formula.")

- [GroupField_GraphQL type for a group field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup\_groups\_creating.html_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/groupfield.doc.html "GroupField - GraphQL type for a group field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_groups_creating.html")

- [HierarchyField_GraphQL type for a hierarchy. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/qs\_hierarchies.html_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/hierarchyfield.doc.html "HierarchyField - GraphQL type for a hierarchy. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/qs_hierarchies.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.\*_](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.*")

- [Metric_Metrics are time series data constructed from fields contained in views. \*Retired in Tableau Cloud February 2024 / Server 2024.2.\*_](metric.doc.html "Metric - Metrics are time series data constructed from fields contained in views.  
    *Retired in Tableau Cloud February 2024 / Server 2024.2.*")

- [MetricDefinition_A Tableau Pulse metric definition. \*Available in Tableau Cloud June 2024 and later. Tableau Pulse is not available in Tableau Server.\*_](metricdefinition.doc.html "MetricDefinition - A Tableau Pulse metric definition.  
    *Available in Tableau Cloud June 2024 and later. Tableau Pulse is not available in Tableau Server.*")

- [PublishedDatasource_A Tableau data source that has been published separately to Tableau Server. It can be used by multiple workbooks._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/publisheddatasource.doc.html "PublishedDatasource - A Tableau data source that has been published separately to Tableau Server. It can be used by multiple workbooks.")

- [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")

- [SetField_GraphQL type for a set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup\_sets\_create.html_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/setfield.doc.html "SetField - GraphQL type for a set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.html")

- [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.")