---
schema_version: "1"
id: ac00efde763f4f37165d164eed83ffd784650e34eec66a1d6242eb350f34f6d5
title: ViewSortOrder
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/metadata_api/reference/viewsortorder.doc.md
canonical_url: https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/viewsortorder.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: f33ae74b268bedc344b1049b8e1ef7448556f6671e22fcebd992163db18eca63
---
_menu_ Types

INPUT\_OBJECT

# ViewSortOrder

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

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

- [Tag_A tag associated with content items_](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/tag.doc.html "Tag - A tag associated with content items")

- [Workbook_Workbooks are used to package up Tableau visualizations (which are called "sheets" in the Metadata API) and data models (which are called "embedded data sources" when they are owned by a workbook)._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/workbook.doc.html "Workbook - Workbooks are used to package up Tableau visualizations (which are called \"sheets\" in the Metadata API) and data models (which are called \"embedded data sources\" when they are owned by a workbook).")