Skip to content

Commit 3fe1605

Browse files
committed
add ordering-paging include to Web API content
1 parent 3e68c8b commit 3fe1605

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

powerapps-docs/developer/data-platform/includes/cc-ordering-paging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!--
22
This content must remain generic. It is used for FetchXml and QueryExpression.
3-
It could also be used in the Web API content
3+
It is also used in the Web API content
44
-->
55

66
## Ordering and paging
77

88
How a page is ordered makes a big difference when paging data. If the information about how the results are ordered is ambiguous, Dataverse can't consistently or efficiently return paged data.
99

10-
Specify an order for your query. With [FetchXml](../fetchxml/overview.md), if you don't add any order elements to your query, Dataverse adds an order based on the primary key of the table. However [QueryExpression](../org-service/queryexpression/overview.md) does not, and when your query specifies `distinct` results, no primary key values are returned, so Dataverse can't add this default order. You must specify a paging order. Without any order specified, `distinct` query results might be returned in random order.
10+
Specify an order for your query. With [FetchXml](../fetchxml/overview.md), if you don't add any order elements to your query, Dataverse adds an order based on the primary key of the table. However [QueryExpression](../org-service/queryexpression/overview.md) does not, and when your query specifies `distinct` results, no primary key values are returned, so Dataverse can't add this default order. You must specify a paging order. Without any order specified, `distinct` query results might be returned in random order. OData doesn't provide any option to return distinct results, but you should still apply an order when retrieving paged results.
1111

1212
Paging is dynamic. Each request is evaluated independently as they're received. A paging cookie tells Dataverse the previous page. With this paging cookie data, Dataverse can start with the next record after the last one on the preceding page.
1313

powerapps-docs/developer/data-platform/webapi/query-data-web-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ GET [Organization URI]/api/data/v9.2/accounts?$select=name,revenue
800800
&$filter=revenue ne null
801801
```
802802

803+
[!INCLUDE [cc-ordering-paging](../includes/cc-ordering-paging.md)]
804+
803805
## Filter rows
804806

805807
Use the `$filter` [query option](#odata-query-options) to filter a collection of resources.

0 commit comments

Comments
 (0)