Skip to content

Latest commit

 

History

History
58 lines (48 loc) · 1.84 KB

File metadata and controls

58 lines (48 loc) · 1.84 KB
title description author ms.author ms.reviewer ms.date ms.topic ms.subservice search.audienceType contributors
order element
Use this element to specify the sort order of rows from the containing entity or link-entity element.
pnghub
gned
jdaly
02/29/2024
reference
dataverse-developer
developer
JimDaly
dmitmikh
dasussMS
apahwa-lab
DonaldlaGithub

order element

[!INCLUDE order-description]

Learn how to order rows using FetchXml.

Example

This example return account records in ascending order by createdon, name, and accountnumber values.

<fetch>
  <entity name='account'>
    <attribute name='name' />
    <attribute name='accountnumber' />
    <attribute name='createdon' />
    <order attribute='createdon' />
    <order attribute='name' />
    <order attribute='accountnumber' />
  </entity>
</fetch>

Attributes

Name Required? Description
attribute Yes The name of the attribute element to sort the data by.
alias No The alias of the attribute element to sort the data by
descending No Whether to sort the data in descending order.
entityname No Use this attribute to specify sort order for link-entity elements so that they aren't applied last. In an order within an entity element, set entityname to the alias value of a link-entity. Learn how to apply link-entity orders first

Parent elements

Name Description
entity [!INCLUDE entity-description]
link-entity [!INCLUDE link-entity-description]

[!INCLUDE footer-banner]