Skip to content

Commit 62e7a45

Browse files
committed
Merge branch 'master' into pehecke-webapi-sample-update
2 parents a72e765 + 2973f11 commit 62e7a45

File tree

190 files changed

+1733
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+1733
-1
lines changed

powerapps-docs/developer/common-data-service/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
href: use-fetchxml-left-outer-join-query-records-not-in.md
2828
- name: Page large result sets with FetchXML
2929
href: org-service/page-large-result-sets-with-fetchxml.md
30+
- name: Paging behaviors and ordering
31+
href: org-service/paging-behaviors-and-ordering.md
3032
- name: Use column comparison in queries
3133
href: column-comparison.md
3234
- name: "Use SQL to query data (Preview)"

powerapps-docs/developer/common-data-service/org-service/page-large-result-sets-with-fetchxml.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ while (true)
108108
}
109109
```
110110

111-
### See also
111+
### See also
112+
113+
[Paging behaviors and ordering](paging-behaviors-and-ordering.md)
112114
[Sample: Use FetchXML with a Paging Cookie](samples/use-fetchxml-paging-cookie.md)
113115
[Building Queries with FetchXML](/dynamics365/customer-engagement/developer/org-service/build-queries-fetchxml)
114116
[Fiscal date and older than datetime query operators in FetchXML](../use-fetchxml-fiscal-date-older-datetime-query-operators.md)
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
title: "Paging behaviors and ordering (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "Learn about the different paging behaviors for FetchXML queries and how you can write queries to get the desired paging results." # 115-145 characters including spaces. This abstract displays in the search result.
4+
ms.custom: ""
5+
ms.date: 7/20/2020
6+
ms.reviewer: "pehecke"
7+
ms.service: powerapps
8+
ms.topic: "article"
9+
author: "NHelgren" # GitHub ID
10+
ms.author: "nhelgren" # MSFT alias of Microsoft employees only
11+
manager: "mayadu" # MSFT alias of manager or PM counterpart
12+
search.audienceType:
13+
- developer
14+
search.app:
15+
- PowerApps
16+
- D365CE
17+
---
18+
19+
# Paging behaviors and ordering
20+
21+
When querying data using FetchXML, paging query results can make viewing large
22+
volumes of information easier. It is important when using paging to include
23+
ordering parameters as well. Without proper ordering, paging requests for the
24+
“next 50” records can result in retrieving the same records across multiple
25+
pages making reviews and edits much more difficult. Proper page ordering
26+
requires including unique values to help identify which records are included in
27+
a page.
28+
29+
## Legacy paging
30+
31+
Legacy paging within the Common Data Service loads all the results of the query
32+
up to the current page into memory on the server, selects the number of records
33+
that are needed for the page, and then ignores the rest. This has benefits such
34+
as quick back/forward paging through the data or skipping to a specific page,
35+
but it also has restrictions such as a 50K row limit, performance issues with
36+
large complex queries, and arbitrarily sorted distinct query results.
37+
38+
## Ordering with a paging cookie
39+
40+
When paging with ordering, a cache of the previous page’s results is stored in a
41+
paging cookie. This is used to calculate what the next page of data should
42+
display.
43+
44+
If a user does not specify any “order by” parameters, the system will
45+
automatically insert “order by "\<\<entity name\>\>".\<\<entityId\>\> asc” to
46+
provide some basic ordering. Depending on the data that is being queried, this
47+
may result in inadequate and unexpected results as a single system user can be
48+
associated with multiple records within any query.
49+
50+
If distinct FetchXML queries are being used, the system will not add any
51+
additional ordering due to potential impacts to the data returned. In these
52+
cases, users will have to add at least a single ordering value for a more
53+
consistent paging experience.
54+
55+
> [!NOTE]
56+
> Paging using FetchXML for Common Data Service is dynamic. The page a
57+
> record appears on is determined at the time that each page is rendered. If 1000
58+
> records are being displayed 50 to a page, the first 50 records are displayed as
59+
> page one. When page two is requested, the system determines what the next 50
60+
> records should be at the time of request. Because of this, it would not be
61+
> possible to use the new paging functionality for back paging. Legacy behavior is
62+
> used for back paging which will have reduced performance and any returns after
63+
> page 500 cannot be “paged back” due to legacy limitations. 
64+
65+
### Why ordering is important
66+
67+
If a query is run to retrieve all records with a state of “Open” this could
68+
result in 1000 returns. When paging from page one to page two, there is no way
69+
for the system to know which orders to display on page two because all of the
70+
records have the same state. The paging of these records will not be efficient
71+
or consistent.
72+
73+
Providing an “order by” value gives the paging cookie the ability to order the
74+
data by an additional value and recognize the last record in a page based on the
75+
values provided.
76+
77+
#### Example 1
78+
79+
A query is created to get all records with a state of ‘Open’, include the status
80+
for every record, and show three records per page. The query is then ordered by
81+
status. The query result would page as shown in the following table:
82+
83+
| State | Status | Page |
84+
|-----------|------------|---------------|
85+
| Open | Active | 1 |
86+
| Open | Active | 1 |
87+
| Open | Active | End of page 1 |
88+
| Open | Active | |
89+
| Open | Active | |
90+
| Open | Inactive | |
91+
| Open | Inactive | |
92+
93+
The paging cookie will save information about the last record on the page, but
94+
when it’s time to get page two in this example, there is no unique identifier to
95+
ensure that the next page populated uses the unviewed records or include the
96+
first two records that were on page one.
97+
98+
To solve this problem, queries should include “order by” columns that have
99+
unique values. It is possible to use multiple “order by” values. Below is a
100+
better way to order data for this query:
101+
102+
#### Example 2
103+
104+
A query is created to get all records of a state of ‘Open’, any status, include
105+
the Case IDs, and show three records per page. It orders by status and by Case
106+
ID (a unique identifier) which will order in ascending order. The query result
107+
would page the results as shown below:
108+
109+
| State | Status | Case ID | Page |
110+
|-----------|------------|-------------|---------------|
111+
| Open | Active | Case-0010 | 1 |
112+
| Open | Active | Case-0021 | 1 |
113+
| Open | Active | Case-0032 | End of Page 1 |
114+
| Open | Active | Case-0034 | |
115+
| Open | Active | Case-0070 | |
116+
| Open | Inactive | Case-0015 | |
117+
| Open | Inactive | Case-0047 | |
118+
119+
The query results are first ordered by the Status, and then ordered by the Case
120+
ID in ascending order. When page two is generated, the result would be as shown
121+
below:
122+
123+
| State | Status | Case ID | Page |
124+
|-----------|------------|-------------|---------------|
125+
| Open | Active | Case-0010 | |
126+
| Open | Active | Case-0021 | |
127+
| Open | Active | Case-0032 | End of Page 1 |
128+
| Open | Active | Case-0034 | 2 |
129+
| Open | Active | Case-0070 | 2 |
130+
| Open | Inactive | Case-0015 | |
131+
| Open | Inactive | Case-0047 | |
132+
133+
When generating page two of this query set, the cookie will have Case-0032
134+
stored as the last record in the first page, so page two will pick up at the
135+
next record in the set after that record. This will allow for more consistent
136+
results.
137+
138+
### Ordering suggestions
139+
140+
Listed below are some suggestions for improving ordering of paging results, along with some areas to avoid.
141+
142+
#### Best ordering
143+
144+
- Always include a column that has a unique identifier (i.e., entity ID
145+
columns, auto-number columns, user/contact IDs)
146+
147+
#### Good ordering
148+
149+
- Include multiple fields that will most likely result in unique combinations:
150+
- First name + last name + email address
151+
- Full name + email address
152+
- Email address + company name
153+
154+
#### Poor ordering
155+
156+
- Orders that do not include unique identifiers
157+
158+
- Orders that have single or multiple fields that are not likely to provide
159+
uniqueness such as:
160+
- Status and state
161+
- Option sets or booleans
162+
- Name values by themselves (i.e., last only, first only, company name
163+
only)
164+
- Text fields like titles, descriptions, multi-line text
165+
- Non unique number fields
166+
167+
### Ordering and multiple entity queries
168+
169+
Sometimes data is needed that spans multiple entities and must be queried with a
170+
table JOIN. In these cases, ordering can be included for both entities in the
171+
query. Make sure to use at least one column with a unique ID per entity to
172+
ensure the paging provides the best results. However, the query will be
173+
downgraded to legacy paging, where no paging cookie will be returned, in these
174+
cases due to limitations of the N:1 relationship structure that could result in
175+
missing data.
176+
177+
### See Also
178+
179+
[Page large result sets with FetchXML](page-large-result-sets-with-fetchxml.md)

powerapps-docs/maker/TOC.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,22 @@
17461746
href: ../sample-apps/crisis-financial-impact-tracker/use-mobile-app.md
17471747
- name: Use dashboards
17481748
href: ../sample-apps/crisis-financial-impact-tracker/configure-dashboards.md
1749+
- name: Return to the Workplace
1750+
items:
1751+
- name: Overview
1752+
href: ../sample-apps/return-to-workplace/overview.md
1753+
- name: Deploy the solution
1754+
href: ../sample-apps/return-to-workplace/deploy.md
1755+
- name: Configure the solution
1756+
href: ../sample-apps/return-to-workplace/configure.md
1757+
- name: Location Readiness dashboard
1758+
href: ../sample-apps/return-to-workplace/dashboard-for-executive-leadership.md
1759+
- name: Facility Safety Management app
1760+
href: ../sample-apps/return-to-workplace/app-for-facility-manager.md
1761+
- name: Workplace Care Management app
1762+
href: ../sample-apps/return-to-workplace/app-for-health-and-safety-lead.md
1763+
- name: Employee Return to the Workplace app
1764+
href: ../sample-apps/return-to-workplace/app-for-employee.md
17491765
- name: Learn from others
17501766
items:
17511767
- name: Blog

powerapps-docs/maker/canvas-apps/common-issues-and-resolutions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ search.app:
1818

1919
This article lists some common issues that you might encounter while using Power Apps. Where applicable, workarounds are provided.
2020

21+
1. **Connection.Connected returns the wrong value during OnStart in Power Apps for Windows** (July 21, 2020)
22+
While offline, **Connection.Connected** may wrongly return **true** immediately after starting an app in the Windows app. As a workaround, delay when the logic depending on it is executed by using a **Timer** control.
23+
2124
1. **Black box covering part of embedded canvas app** (June 11, 2020)
2225
When using embedded canvas apps such as SharePoint forms, SharePoint web parts, and model driven forms, users many see a black box when scrolling covering part of the app. This issue happens with chromium based browsers starting with version 83. There is not a workaround at this time. The team is actively investigating to find a fix and workaround. **A workaround in Power Apps was deployed in the week of 6/21/2020. In addition, the issue is fixed for Microsoft Edge based on Chromium with version 85.**
2326

77.2 KB
Loading
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Use the Employee Return to the Workplace app
3+
description: Provides information for employees to track their symptoms and determine whether they're eligible to enter into a facility.
4+
author: wbakker
5+
ms.service: powerapps
6+
ms.topic: conceptual
7+
ms.custom:
8+
ms.date: 07/21/2020
9+
ms.author: garybird
10+
ms.reviewer: kvivek
11+
---
12+
13+
# Use the Employee Return to the Workplace app
14+
15+
This article provides step-by-step instructions about how to use the Employee Return to the Workplace app. You can check in, answer questions to determine whether you're eligible to enter a facility, and say how you feel about returning to the workplace.
16+
17+
## Prerequisites
18+
19+
- Download [Power Apps Mobile](https://powerapps.microsoft.com/downloads):
20+
21+
- For Apple devices with iOS, such as iPhone and iPad, use the [App Store](https://aka.ms/powerappsios).
22+
23+
- For Android devices, use [Google Play](https://aka.ms/powerappsandroid).
24+
25+
- Ensure that your organization has deployed and configured the Employee Return to the Workplace app, as described in [Deploy the solution](deploy.md).
26+
27+
## Getting started with the app
28+
29+
Open the app from your device and sign in with your company's Azure Active Directory account. You can view all apps shared with you by your organization after you sign in. More information: [Power Apps mobile device sign in](https://docs.microsoft.com/powerapps/user/run-app-client#open-power-apps-and-sign-in)
30+
31+
When you successfully sign in and open the **Return to the Workplace** app from your mobile device, you can get a day pass, look up facility status, or answer the employee sentiment question.
32+
33+
> [!div class="mx-imgBorder"]
34+
> ![Welcome screen](media/employee-welcome2.png "Welcome screen")
35+
36+
## See the reopen status of a facility
37+
38+
You can find all available facilities and see the reopen status for them. Select **Look Up Status** to look for facilities and view details such as whether the facility is open and what phase of reopening it's in.
39+
40+
When you select a facility from the facility list, the current status of the facility and associated details are displayed. Select **<** to return to the home screen.
41+
42+
> [!div class="mx-imgBorder"]
43+
> ![List of facilities](media/employee-facility-list2.png "List of facilities")
44+
45+
> [!div class="mx-imgBorder"]
46+
> ![Facility details](media/employee-facility-details2.png "Facility details")
47+
48+
## Check in to a facility
49+
50+
After you complete the steps to select a particular facility that's open to employees returning to work, you can complete a health survey that determines whether you're eligible to check in to that facility.
51+
52+
If you're eligible, you'll be given a pass to your selected building for that day.
53+
54+
**To check in to a facility**
55+
56+
1. Select **GET DAY PASS**.
57+
58+
2. Select an available facility from the facility list.
59+
60+
3. Select **Start Health Survey** to complete the check-in process.
61+
62+
> [!div class="mx-imgBorder"]
63+
> ![Start survey](media/employee-start-survey2.png "Start survey")
64+
65+
4. Accept the terms and agreements.
66+
67+
> [!div class="mx-imgBorder"]
68+
> ![Terms and agreements](media/employee-termandagreement.png "Terms and agreements")
69+
70+
5. Review the **Symptom Check** statements. Select **I Agree** if you agree with the statements, and **I Disagree** if you don't.
71+
72+
> [!div class="mx-imgBorder"]
73+
> ![Symptom check](media/employee-agreement.png "Symptom check")
74+
75+
### Employee pass
76+
77+
If your responses to the symptom check statements show that you're healthy, you'll receive a pass to enter the selected facility. The pass expires in 24 hours.
78+
79+
> [!div class="mx-imgBorder"]
80+
> ![Employee pass](media/employee-pass.png "Employee pass")
81+
82+
If your responses show you aren't healthy, you won't receive a pass and you'll be given contact information for the company health and safety department to use if you need.
83+
84+
> [!div class="mx-imgBorder"]
85+
> ![Not feeling well](media/employee-pass-negative.png "Not feeling well")
86+
87+
## Share sentiment
88+
89+
You can say how you're feeling about returning to the workplace. On the home page, select one of the options to answer the question **Do you feel safe returning to work?**
90+
91+
> [!div class="mx-imgBorder"]
92+
> ![Share sentiment](media/employee-share-sentiment2.png "Share sentiment")
93+
94+
This option will reset itself after you reopen the app.
95+
96+
> [!div class="mx-imgBorder"]
97+
> ![Share sentiment](media/employee-share-sentiment2-2.png "Share sentiment")
98+
99+
## Feedback about the solution
100+
101+
To provide feedback about the Return to the Workplace solution, visit <https://aka.ms/rtw-community>.

0 commit comments

Comments
 (0)