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 |
|
|
[!INCLUDE order-description]
Learn how to order rows using FetchXml.
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>
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 |
Name | Description |
---|---|
entity | [!INCLUDE entity-description] |
link-entity | [!INCLUDE link-entity-description] |
[!INCLUDE footer-banner]