Skip to content

Commit 6748e42

Browse files
Merge branch 'master' into LanceDelano
2 parents 5d755ce + 2cba26b commit 6748e42

Some content is hidden

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

47 files changed

+595
-283
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
href: column-comparison.md
3434
- name: FetchXML search item limit
3535
href: quick-find-limit.md
36+
- name: Improve FetchXML request performance
37+
href: fetchxml-performance.md
3638
- name: "Use SQL to query data (Preview)"
3739
href: cds-sql-query.md
3840
- name: Saved Queries

powerapps-docs/developer/common-data-service/cds-sql-query.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use SQL to query data (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Learn how to query Common Data Service entity data using SQL." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 05/26/2020
5+
ms.date: 09/25/2020
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -20,8 +20,13 @@ search.app:
2020

2121
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
2222

23+
> [!WARNING]
24+
> A problem has been identified with the Tabular Data Stream (TDS) endpoint. This feature is globally disabled, and we are working urgently to address the issue. This topic will be updated when the issue is resolved or when we have more information to share.
25+
2326
A SQL data connection is available on the Common Data Service endpoint. The SQL connection provides read-only access to the entity data of the target Common Data Service environment. This allows you to write and execute SQL queries against the entity data table. Table columns provide the attribute data of the entity. No custom views of the data have been provided.
2427

28+
29+
2530
> [!IMPORTANT]
2631
> - This is a preview feature, and isn't available in all regions.
2732
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: Improve FetchXML request performance | Microsoft Docs
3+
description: Learn how developers can improve FetchXML request performance when using Common Data Service.
4+
author: NHelgren
5+
manager: annbe
6+
ms.service: powerapps
7+
ms.topic: article
8+
ms.date: 09/28/2020
9+
ms.author: nhelgren
10+
ms.reviewer: "pehecke"
11+
search.audienceType:
12+
- developer
13+
search.app:
14+
- PowerApps
15+
- D365CE
16+
---
17+
18+
# Improve FetchXML request performance
19+
20+
An option available in FetchXML requests called *LateMaterialize* allows you to break up such
21+
requests into smaller more usable segments which can improve the performance of long running FetchXML requests.
22+
23+
> [!NOTE]
24+
> Performance improvements depend on the data distribution for each
25+
> participating entity and linked entity. Late materialization may not always
26+
> provide a performance benefit. It is best used if you are experiencing
27+
> performance issues with your existing fetch request.
28+
29+
Executing a traditional fetch for a given number of the top entity records will pull all
30+
the columns in the select list that meet the filter criteria. Let’s say you are
31+
pulling the top 500 records on an entity that has 100 columns and 100K rows
32+
that meet the filter criteria, this request can cause issues in two ways:
33+
34+
- The 99.5K rows will pull all columns, even though you only need to populate
35+
the select list for 500 rows when returning to the client.
36+
37+
- Query Optimizer can generate an arbitrary order when retrieving the child
38+
columns, resulting in an undesired data order.
39+
40+
Using `LateMaterialize` allows you to create a fetch that will:
41+
42+
- First pull only the primary ID of the top number of records specified.
43+
44+
- Select only the columns of data needed based on the primary IDs that were
45+
retrieved. For example, where only 5 columns are needed for display in the form.
46+
47+
By pulling only the needed data after the primary IDs are collected, the
48+
retrieval is much faster as data that is not needed for the current operation is
49+
excluded.
50+
51+
This is most beneficial when:
52+
53+
- The entity you are querying has one or more links to other entities for column data.
54+
55+
- There are many columns in the entity.
56+
57+
- The entity contains logical attributes.
58+
59+
## Syntax
60+
61+
```xml
62+
<fetch version="1.0" output-format="xml-platform" latematerialize="true"
63+
 mapping="logical" distinct="true">
64+
65+
<entity name="[entity]">​
66+
<attribute name="[attribute]" />
67+
68+
<link-entity name="[entity]" from="[linked entity]" to="[linked entityid]"
69+
link-type="outer" alias="[alias]">​
70+
<attribute name="[name of linked entity column]" />​
71+
</link-entity>
72+
73+
<filter type=[filter type]>​
74+
<condition attribute="[column]" operator="[operator]" value="[value]"/> ​
75+
</filter>​
76+
</entity>
77+
78+
</fetch>
79+
```
80+
81+
## Sample
82+
83+
```XML
84+
<fetch version="1.0" output-format="xml-platform" latematerialize="true"
85+
  mapping="logical" distinct="true">
86+
87+
<entity name="account">​
88+
<attribute name="accountnumber" />​
89+
<attribute name="createdby" />​
90+
<attribute name="ownerid" />​
91+
92+
<link-entity name="account" from="accountid" to="parentaccountid"
93+
link-type="outer" alias="oaccount">​
94+
<attribute name="createdby" />
95+
96+
<link-entity name="account" from="accountid" to="accountid" link-type="outer"
97+
alias="oaccount1">​
98+
<attribute name="createdby" />​
99+
<attribute name="accountid" />​
100+
<attribute name="name" />​
101+
</link-entity>​
102+
</link-entity>​
103+
104+
<link-entity name="account" from="accountid" to="accountid" link-type="outer"
105+
alias="oaccount2"/>
106+
107+
<filter type='and'>​
108+
<condition attribute="statecode" operator="eq" value="2"/> ​
109+
</filter>​
110+
</entity>​
111+
112+
</fetch>
113+
```
114+
115+
### See Also
116+
117+
[Use FetchXML to construct a query](use-fetchxml-construct-query.md)

powerapps-docs/maker/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,8 @@
14491449
href: ./portals/configure/gather-feedback-poll.md
14501450
- name: Create and manage publishing states
14511451
href: ./portals/configure/publishing-states.md
1452+
- name: Create custom Portal Management app
1453+
href: ./portals/configure/create-custom-portal-management-app.md
14521454
- name: Advanced portal customization
14531455
items:
14541456
- name: Work with Liquid templates
@@ -1830,6 +1832,8 @@
18301832
href: ../teams/relationships-table.md
18311833
- name: Work with table columns
18321834
href: ../teams/table-columns.md
1835+
- name: Project Oakdale FAQs
1836+
href: ../teams/data-platform-faqs.md
18331837
- name: Manage your apps
18341838
href: ../teams/manage-your-apps.md
18351839
- name: Publish and share your app

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: powerapps
77
ms.topic: conceptual
88
ms.custom: canvas
99
ms.reviewer:
10-
ms.date: 07/02/2020
10+
ms.date: 09/22/2020
1111
ms.author: kvivek
1212
search.audienceType:
1313
- maker
@@ -28,7 +28,7 @@ This article lists some common issues that you might encounter while using Power
2828
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.**
2929

3030
1. **Problems downloading attachments in SharePoint custom forms** (May 22, 2020)
31-
When using the attachment control to download an attachment, the click won't have any response when using Google Chrome version 83 or the new Microsoft Edge version 83 browser. As a workaround, change to use the default SharePoint form or use another browser. The team is actively working to fix this issue. **Fix has been deployed in the weeek of 6/8/2020**
31+
When using the attachment control to download an attachment, the click won't have any response when using Google Chrome version 83 or the new Microsoft Edge version 83 browser. As a workaround, change to use the default SharePoint form or use another browser. The team is actively working to fix this issue. **Fix has been deployed in the week of 6/8/2020**
3232

3333
1. **Problems downloading attachments in embedded Power Apps** (May 22, 2020)
3434
When using the attachment control to download an attachment, the click won't have any response when using Google Chrome version 83 or the new Microsoft Edge version 83 browser. As a workaround, use another browser. The team is actively working to fix this issue.
@@ -207,3 +207,7 @@ This article lists some common issues that you might encounter while using Power
207207
1. **Card gallery is deprecated**.
208208

209209
Existing apps that use this feature will continue to run for the time being, but you can't add a card gallery. Please replace card galleries with the new **[Edit form](controls/control-form-detail.md)** and **[Display form](controls/control-form-detail.md)** controls.
210+
211+
1. **Power Apps per app plans does not support Power Apps for Windows app**
212+
213+
Power Apps for Windows app is not supported if you're on the [Power Apps per app plans](https://docs.microsoft.com/power-platform/admin/about-powerapps-perapp).

powerapps-docs/maker/canvas-apps/controls/control-microphone.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: powerapps
77
ms.topic: reference
88
ms.custom: canvas
99
ms.reviewer: tapanm
10-
ms.date: 06/12/2020
10+
ms.date: 09/28/2020
1111
ms.author: chmoncay
1212
search.audienceType:
1313
- maker
@@ -40,6 +40,14 @@ Captured media is referenced by a text string URI. For more information, read th
4040
> [!NOTE]
4141
> The microphone control is supported only on Microsoft Edge based on Chromium, Chrome, and Firefox browsers; and Android and iOS devices. All other browsers and platforms will show a warning that some features of the app won't work.
4242
43+
## Considerations for Teams Mobile
44+
45+
The following conditions apply when using the Microphone control in apps created using Power Apps on Teams Mobile:
46+
47+
1. The audio format for microphone recordings in Teams will always be *AAC* with a file extension of .MP4.
48+
1. Teams has its own recording experience. Hence, the microphone control inside apps created using Power Apps will be disabled during the recording period.
49+
1. Microphone recordings are limited to a maximum duration of 10 minutes.
50+
4351
## Key properties
4452

4553
**Audio** – The audio clip captured when the user records with the device's microphone.

powerapps-docs/maker/canvas-apps/functions/function-patch.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ ms.service: powerapps
77
ms.topic: reference
88
ms.custom: canvas
99
ms.reviewer: nabuthuk
10-
ms.date: 03/16/2020
10+
ms.date: 09/25/2020
1111
ms.author: gregli
1212
search.audienceType:
1313
- maker
1414
search.app:
1515
- PowerApps
1616
---
1717
# Patch function in Power Apps
18+
1819
Modifies or creates one or more [records](../working-with-tables.md#records) in a [data source](../working-with-data-sources.md), or merges records outside of a data source.
1920

2021
Use the **Patch** function to modify records in complex situations. Such as, when you do updates that require no user interaction or use forms that span multiple screens.
@@ -95,16 +96,16 @@ Specify two or more records that you want to merge. Records are processed in the
9596
#### Modify or create a record (in a data source)
9697
In these examples, you'll modify or create a record in a data source, named **IceCream**, that contains the data in this [table](../working-with-tables.md) and automatically generates the values in the **ID** [column](../working-with-tables.md#columns):
9798

98-
![](media/function-patch/icecream.png)
99+
![Example icecream](media/function-patch/icecream.png "Example icecream")
99100

100101
| Formula | Description | Result |
101102
| --- | --- | --- |
102-
| **Patch(&nbsp;IceCream,<br>First( Filter( IceCream, Flavor = "Chocolate" ) ), {&nbsp;Quantity:&nbsp;400&nbsp;} )** |Modifies a record in the **IceCream** data source:<ul><li> The **ID** column of the record to modify contains the value of **1**. (The **Chocolate** record has that ID.)</li><li>The value in the **Quantity** column changes to **400**. |{&nbsp;ID:&nbsp;1, Flavor:&nbsp;"Chocolate", Quantity:&nbsp;400 }<br><br>The **Chocolate** entry in the **IceCream** data source has been modified. |
103+
| **Patch(&nbsp;IceCream,<br>Lookup( IceCream, Flavor = "Chocolate" ), {&nbsp;Quantity:&nbsp;400&nbsp;} )** |Modifies a record in the **IceCream** data source:<ul><li> The **ID** column of the record to modify contains the value of **1**. (The **Chocolate** record has that ID.)</li><li>The value in the **Quantity** column changes to **400**. |{&nbsp;ID:&nbsp;1, Flavor:&nbsp;"Chocolate", Quantity:&nbsp;400 }<br><br>The **Chocolate** entry in the **IceCream** data source has been modified. |
103104
| **Patch( IceCream, Defaults(&nbsp;IceCream ), {&nbsp;Flavor:&nbsp;"Strawberry"&nbsp;}&nbsp;)** |Creates a record in the **IceCream** data source:<ul><li>The **ID** column contains the value **3**, which the data source generates automatically.</li><li>The **Quantity** column contains **0**, which is the default value for that column in the **IceCream** data source, as the **[Defaults](function-defaults.md)** function specifies.<li>The **Flavor** column contains the value of **Strawberry**.</li> |{ ID:&nbsp;3, Flavor:&nbsp;"Strawberry", Quantity:&nbsp;0&nbsp;}<br><br>The **Strawberry** entry in the **IceCream** data source has been created. |
104105

105106
After the previous formulas have been evaluated, the data source ends with these values:
106107

107-
![](media/function-patch/icecream-after.png)
108+
![Example icecream after](media/function-patch/icecream-after.png "Example icecream after")
108109

109110
#### Merge records (outside of a data source)
110111

@@ -113,11 +114,12 @@ After the previous formulas have been evaluated, the data source ends with these
113114
| **Patch(&nbsp;{&nbsp;Name:&nbsp;"James",&nbsp;Score:&nbsp;90&nbsp;}, {&nbsp;Name:&nbsp;"Jim",&nbsp;Passed:&nbsp;true&nbsp;} )** |Merges two records outside of a data source:<br><ul><li>The values in the **Name** column of each record don't match. The result contains the value (**Jim**) in the record that's closer to the end of the argument list instead of the value (**James**) in the record that's closer to the start.</li><li>The first record contains a column (**Score**) that doesn't exist in the second record. The result contains that column with its value (**90**).</li><li>The second record contains a column (**Passed**) that doesn't exist in the first record. The result contains that column with its value (**true**). |{&nbsp;Name:&nbsp;"Jim", Score:&nbsp;90, Passed:&nbsp;true&nbsp;} |
114115

115116
### Use of **As** or **ThisRecord**
116-
Avoid an ambiguous evaluation context by using the **As** or **ThisRecord** keyword.
117117

118-
In the example below, consider the first Lookup in the If statement. (OrderID = A[@OrderID]) is expected to compare the OrderId in the Lookup scope with the OrderId of collection A in the ForAll scope. In this case, you likely want A[@OrderId] to be resolved as a local parameter. But it is ambiguous.
118+
Using the **As** or **ThisRecord** keyword in the formula avoids ambiguous evaluation context.
119+
120+
In the example below, consider the first lookup in the `If` statement. `(OrderID = A[@OrderID])` is expected to compare the `OrderId` in the lookup scope with the `OrderId` of collection `A` in the `ForAll` scope. In this case, you likely want `A[@OrderId]` to be resolved as a local parameter. But it is ambiguous.
119121

120-
Power Apps currently interprets both the LHS side OrderId and RHS side A[@OrderId] as a field in the Lookup scope. Therefore, Lookup will always find the first row in [dbo].[Orders1] because the condition is always true (i.e., any row's OrderId is equal to itself.)
122+
Power Apps currently interprets both the left-hand side `OrderId` and right-hand side `A[@OrderId]` as a field in the lookup scope. Therefore, lookup will always find the first row in `[dbo].[Orders1]` because the condition is always true (that is, any row's `OrderId` is equal to itself.)
121123

122124
```powerapps-dot
123125
ClearCollect(
@@ -158,11 +160,11 @@ ForAll(
158160

159161
#### Using **As** or **ThisRecord**
160162

161-
Whenever possible use the **As** operator or the **ThisRecord** to disambiguate the LHS. **As** is recommended for the above scenario.
163+
Whenever possible use the **As** operator or the **ThisRecord** to disambiguate the left-hand side. **As** is recommended for the above scenario.
162164

163-
When your formula uses multiple scopes with ForAll, Filter, Lookup on the same data source or table, it is possible that the scope parameters may collide with a same named field elsewhere. Therefore, it is also recommended to use the **As** operator or **ThisRecord** to resolve the field name and avoid ambiguity.
165+
When your formula uses multiple scopes with `ForAll`, `Filter`, and `Lookup` on the same data source or table, it is possible that the scope parameters may collide with a same field elsewhere. Therefore, it is recommended to use the **As** operator or **ThisRecord** to resolve the field name and avoid ambiguity.
164166

165-
For example, we can use the **As** operator to disambiguate in the example below.
167+
For example, you can use the **As** operator to disambiguate in the example below.
166168

167169
```powerapps-dot
168170
ClearCollect(
@@ -201,7 +203,7 @@ ForAll(
201203
)
202204
```
203205

204-
Alternatively, we can use **ThisRecord** for the same purpose.
206+
Alternatively, you can use **ThisRecord** for the same purpose.
205207

206208
```powerapps-dot
207209
ClearCollect(
@@ -239,7 +241,8 @@ ForAll(
239241
)
240242
)
241243
```
242-
For detailed usage of the **As** operator and **ThisRecord**. For details, please see the **[Operators](operators.md)** article.
244+
245+
To learn more about the usage of **As** operator and **ThisRecord** see **[Operators](operators.md)** article.
243246

244247

245248

powerapps-docs/maker/canvas-apps/functions/function-update-updateif.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Both **Update** and **UpdateIf** return the modified data source as a [table](..
4343
* *DataSource* – Required. The data source that contains the record that you want to replace.
4444
* *OldRecord* – Required. The record to replace.
4545
* *NewRecord* – Required. The replacement record. This isn't a change record. The entire record is replaced, and missing properties will contain *blank*.
46-
* **All** – Optional. In a collection, the same record may appear more than once. Specify the **All** argument to remove all copies of the record.
46+
* *All* – Optional. In a collection, the same record may appear more than once. Specify the **All** argument to update all copies of the record.
4747

4848
**UpdateIf**( *DataSource*, *Condition1*, *ChangeRecord1* [, *Condition2*, *ChangeRecord2*, ... ] )
4949

0 commit comments

Comments
 (0)