Skip to content

Commit 93096df

Browse files
authored
Merge pull request #1619 from MicrosoftDocs/master
Publish: add graphics, etc. to connector topic for CDS
2 parents 0272fc5 + cfb3350 commit 93096df

File tree

7 files changed

+89
-76
lines changed

7 files changed

+89
-76
lines changed

powerapps-docs/maker/canvas-apps/connections/connection-common-data-service.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,22 @@ search.app:
1919

2020
You can securely store your business data in Common Data Service and build rich apps in PowerApps so that users can manage that data. You can also integrate that data into solutions that include Microsoft Flow, Power BI, and data from Dynamics 365.
2121

22-
By default, the Common Data Service connector connects to data in your app's current environmnent. If your app moves to another environment, the connector connects to data in the new environment. This works well for an app using a single environment or an app that follows an ALM process for moving from Development to Test to Production.
22+
By default, the Common Data Service connector connects to data in your app's current environmnent. If your app moves to another environment, the connector connects to data in the new environment. This behavior works well for an app using a single environment or an app that follows an ALM process for moving from Development to Test to Production.
2323

24-
When you add a data source with the Common Data Service connector, you can change the environment and then select one or more entities. By default, the app connects to data in the current environment, and the UI shows **(Current)** over the list of entities. If you select **Change**, you can specify a different environment to pull data from it instead of or in addition to the current environment.
24+
When you add a data source with the Common Data Service connector, you can change the environment and then select one or more entities. By default, the app connects to data in the current environment, and the UI shows **(Current)** over the list of entities.
2525

26-
![Common Data Service Change Environment](media/connection-common-data-service/common-data-service-connection-change-environment.png)
26+
> [!div class="mx-imgBorder"]
27+
> ![Default environment](media/connection-common-data-service/common-data-service-connection-change-environment.png)
28+
29+
If you select **Change**, you can specify a different environment to pull data from it instead of or in addition to the current environment.
30+
31+
> [!div class="mx-imgBorder"]
32+
> ![Other environments](media/connection-common-data-service/common-data-service-connection-select-environment.png)
33+
34+
The name of the selected environment appears under the search box.
35+
36+
> [!div class="mx-imgBorder"]
37+
> ![New environments](media/connection-common-data-service/common-data-service-connection-after-change-environment.png)
2738
2839
The Common Data Service connector is more robust than the Dynamics 365 connector and approaching feature parity.
2940

powerapps-docs/maker/canvas-apps/functions/function-astype-istype.md

Lines changed: 16 additions & 14 deletions
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: anneta
10-
ms.date: 05/06/2019
10+
ms.date: 05/17/2019
1111
ms.author: gregli
1212
search.audienceType:
1313
- maker
@@ -17,27 +17,29 @@ search.app:
1717

1818
# AsType and IsType functions in canvas apps
1919

20-
Checks a record reference for a specific entity type and treats the reference as a specific type.
20+
Checks a record reference for a specific entity type (**IsType**) and treats the reference as a specific type (**AsType**).
2121

2222
## Description
2323

24-
Read [understand record references and polymorphic lookups](../working-with-references.md) for a broader introduction and more details.
24+
Read [Understand record references and polymorphic lookups](../working-with-references.md) for a broader introduction and more details.
2525

2626
A lookup field usually refers to records in a particular entity. Because the entity type is well established, you can access the fields of the lookup by using a simple dot notation. For example, **First( Accounts ).'Primary Contact'.'Full Name'** walks from the **Accounts** entity to the **Primary Contact** record in the **Contacts** entity and extracts the **Full Name** field.
2727

28-
Common Data Service also supports polymorphic lookup fields, which can refer to records from a set of entities, as in these examples:
28+
Common Data Service also supports polymorphic lookup fields, which can refer to records from a set of entities, as in these examples.
2929

3030
| Lookup field | Can refer to |
3131
|--------------|--------------|
3232
| **Owner** | **Users** or **Teams** |
3333
| **Customer** | **Accounts** or **Contacts** |
3434
| **Regarding** | **Accounts**, **Contacts**, **Knowledge Articles**, etc. |
3535

36+
<!--note from editor: Change "Knowledge Articles" to "Knowledge Base articles" if that is what is being referenced. -->
37+
3638
In canvas-app formulas, you can use record references to work with polymorphic lookups. Because a record reference can refer to different entities, you don't know which fields will be available when you write a formula. The *.Field* notation isn't available. Those formulas must adapt to the records that the app encounters when it runs.
3739

38-
The **IsType** function tests whether a record reference refers to a specific entity type. The function returns a Boolean *true* or *false*.
40+
The **IsType** function tests whether a record reference refers to a specific entity type. The function returns a Boolean TRUE or FALSE.
3941

40-
The **AsType** function treats a record reference as a specific entity type, sometimes referred to as *casting*. You can use the result as if it were a record of the entity and, again, use *.Field* notation to access all of the fields of that record. An error occurs if the reference isn't of the specific type.
42+
The **AsType** function treats a record reference as a specific entity type, sometimes referred to as *casting*. You can use the result as if it were a record of the entity and, again, use the *.Field* notation to access all of the fields of that record. An error occurs if the reference isn't of the specific type.
4143

4244
Use these functions together to first test the entity type of a record and then treat it as a record of that type so that the fields are available:
4345

@@ -60,7 +62,7 @@ Similarly, you can use record references with the [**Patch**](function-patch.md)
6062
Patch( Accounts, First( Accounts ), { Owner: First( Teams ) } )
6163
```
6264

63-
If used in a record context, such as within a [**Gallery**](../controls/control-gallery.md) or [**Edit form**](../controls/control-form-detail.md) control, you might need to use the [global disambiguation operator](operators.md#disambiguation-operator) to reference the entity type. For example, this formula would be effective for a gallery that's displaying a list of contacts where **Company Name** is a **Customer** lookup.
65+
If used in a record context, such as within a [**Gallery**](../controls/control-gallery.md) or [**Edit form**](../controls/control-form-detail.md) control, you might need to use the [global disambiguation operator](operators.md#disambiguation-operator) to reference the entity type. For example, this formula would be effective for a gallery that's displaying a list of contacts where **Company Name** is a **Customer** lookup:
6466

6567
```powerapps-dot
6668
If( IsType( ThisItem.'Company Name', [@Accounts] ),
@@ -71,7 +73,7 @@ If( IsType( ThisItem.'Company Name', [@Accounts] ),
7173

7274
For both functions, you specify the type through the name of the data source that's connected to the entity. For the formula to work, you must also add a data source to the app for any types that you want to test or cast. For example, you must add the **Users** entity as a data source if you want to use **IsType** and **AsType** with an **Owner** lookup and records from that entity. You can add only the data sources that you actually use in your app; you don't need to add all the entities that a lookup could reference.
7375

74-
If the record reference is *blank*, **IsType** returns *false*, and **AsType** returns *blank*. All fields of a *blank* record will be *blank*.
76+
If the record reference is *blank*, **IsType** returns FALSE, and **AsType** returns *blank*. All fields of a *blank* record will be *blank*.
7577

7678
## Syntax
7779

@@ -83,7 +85,7 @@ If the record reference is *blank*, **IsType** returns *false*, and **AsType** r
8385
**IsType**( *RecordReference*, *EntityType* )
8486

8587
- *RecordReference* - Required. A record reference, often a lookup field that can refer to a record in any of multiple entities.
86-
- *EntityType* - Required. The specific entity to which to cast.
88+
- *EntityType* - Required. The specific entity to which the record should be cast.
8789

8890
## Example
8991

@@ -95,12 +97,12 @@ If the record reference is *blank*, **IsType** returns *false*, and **AsType** r
9597
> [!div class="mx-imgBorder"]
9698
> ![Blank app with two data sources: accounts and contacts](media/function-astype-istype/contacts-add-datasources.png)
9799
98-
1. Insert a **Gallery** control with a **Blank vertical** orientation:
100+
1. Insert a **Gallery** control with a **Blank vertical** orientation.
99101

100102
> [!div class="mx-imgBorder"]
101103
> ![Insert a gallery control with a blank vertical layout](media/function-astype-istype/contacts-customer-gallery.png)
102104
103-
1. On the **Properties** tab of the right-hand pane, set the gallery's **Items** property to **Contacts**.
105+
1. On the **Properties** tab near the right side of the screen, set the gallery's **Items** property to **Contacts**.
104106

105107
> [!div class="mx-imgBorder"]
106108
> ![Set items to Contacts in the properties pane](media/function-astype-istype/contacts-customer-datasource.png)
@@ -113,12 +115,12 @@ If the record reference is *blank*, **IsType** returns *false*, and **AsType** r
113115
> [!div class="mx-imgBorder"]
114116
> ![Set layout to Title and subtitle](media/function-astype-istype/contacts-customer-flyout.png)
115117
116-
1. In the **Data** pane, open the **Title1** list, and then select **Full Name**:
118+
1. In the **Data** pane, open the **Title1** list, and then select **Full Name**.
117119

118120
> [!div class="mx-imgBorder"]
119121
> ![Set title value](media/function-astype-istype/contacts-customer-title.png)
120122
121-
1. Select the **Subtitle1** label control:
123+
1. Select the **Subtitle1** label control.
122124

123125
> [!div class="mx-imgBorder"]
124126
> ![Set subtitle value](media/function-astype-istype/contacts-customer-subtitle.png)
@@ -141,4 +143,4 @@ If the record reference is *blank*, **IsType** returns *false*, and **AsType** r
141143
- "Account: " and then the **Account Name** field from the **Accounts** entity if the **Company Name** field refers to an account.
142144
- "Contact: " and then the **Full Name** field from the **Contacts** entity if the **Company Name** field refers to a contact.
143145
144-
Your results might differ from those in this topic because it uses sample data that was modified to show additional types of results.
146+
Your results might differ from those in this topic because it uses sample data that was modified to show additional types of results.

0 commit comments

Comments
 (0)