You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/maker/model-driven-apps/embedded-canvas-app-add-classic-designer.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,11 @@
2
2
title: "Add an embedded canvas app on a model-driven form | MicrosoftDocs"
3
3
description: Learn how to embed a canvas app into a model-driven form in Power Apps
4
4
ms.custom: ""
5
-
ms.date: 12/06/2022
5
+
ms.date: 06/15/2023
6
6
ms.reviewer: "matp"
7
-
ms.suite: ""
8
-
ms.tgt_pltfrm: ""
9
7
ms.topic: "how-to"
10
8
applies_to:
11
9
- "Dynamics 365 (online)"
12
-
- "Dynamics 365 Version 9.x"
13
10
- "PowerApps"
14
11
author: "matthewbolanos"
15
12
ms.subservice: mda-maker
@@ -23,7 +20,7 @@ search.audienceType:
23
20
24
21
This article explains how to embed a [canvas app](model-driven-app-glossary.md#canvas-app) on a model-driven form. Canvas apps can be connected to a wide range of data sources and offer designers greater control around the overall user experience.
25
22
26
-
Two methods of integration are described in this article. First, using the modern unified interface experience, and second, using the classic experience.
23
+
Two methods of integration are described in this article. First, using the modern Unified Interface experience, and second, using the classic experience.
27
24
28
25
> [!NOTE]
29
26
> There is a third and more recent method of embedding canvas apps inside a modern app, which uses custom pages for better integration with the canvas app. [Overview of custom pages for model-driven apps](model-app-page-overview.md).
@@ -42,37 +39,45 @@ To embed a canvas app on a model-driven app main form, such as the main form for
42
39
> [!TIP]
43
40
> By default, the canvas app component label is **New canvas app**. You may want to change the canvas app label name to something more meaningful, such as the name of the canvas app or a short description of the canvas app that you’re embedding onto the form.
44
41
42
+
1. Select the area on the form where you want the canvas app to display or create a new tab to display the canvas app.
45
43
1. On the left navigation pane select **Components**, expand **Display**, and then select the **Canvas app** component.
46
44
47
45
1. The following properties can be configured for the control.
48
-
- The optional **Entity name** area lets you specify the following properties:
46
+
- The **Entity name** area lets you specify the following properties:
49
47
50
48
-**Bind to table column**: When the **Bind to table column** is selected, the **Static value** property changes to allow you to select what table column to bind to. When you choose to bind to a table column, the column will be defined by the table column value. For example, when **Bind to table column** is selected for the **Entity name**, at app runtime the value of the table name takes the value of the **Table column** specified.
51
49
52
-
-**Static value**: Use this to add a name for you to refer to the canvas app. Notice that this value has no effect on the embedded canvas app. It is meant only to serve as a reference point.
53
-
- The **App Name**optional area specifies the name of the canvas app.
50
+
-**Static value**: Use this to add a name for you to refer to the canvas app. Notice that this value has no effect on the embedded canvas app. It's meant only to serve as a reference point.
51
+
- The **App name** area specifies the unique name of the canvas app.
54
52
-**Bind to table column**: When you select the **Bind to table column**, the **Static value** property changes to allow you to select what table column to bind to. When you choose to bind to a table column, the column will be defined by the table column value. For example, when you select **Bind to table column** for the **App Name**, at app runtime the value of the app name takes the value of the Table column, such as the value from a custom text column.
55
53
56
-
-**Static value**: Specifies the name of the canvas app to embed. The model-driven form looks for the canvas app with the specified name in the current environment. If a canvas app with that name can't be found in the environment, the canvas app control will use the App ID to load the canvas app. Enter the app namefor an existing canvasapp.
54
+
-**Static value**: Specifies the unique name of the canvas app to embed. Enter the canvas app's unique name for an existing canvas app. More information: [How to find the unique name and app ID for a canvas app](#how-to-find-the-unique-name-and-app-id-for-a-canvas-app)
57
55
58
56
- The required **App ID** area specifies the app ID for the canvas app.
59
57
-**Bind to table column**: When you select **Bind to table column**, the list changes to allow you to select what table column to bind to. When you choose to bind to a table column, the column will be defined by the table column value. For example, when you select **Bind to table column** for the **App Name**, at app runtime the value of the app name takes the value of the column, such as the value from a custom text column.
60
-
> [!IMPORTANT]
61
-
> For most situations, we don’t recommend using the **Bind to table column** option for the App ID as this would require the correct app ID to be shown in a field within the record.
58
+
> [!IMPORTANT]
59
+
> For most situations, we don’t recommend using the **Bind to table column** option for the App ID as this would require the correct app ID to be shown in a field within the record.
62
60
63
-
-**Static value**: Enter the app ID for an existing canvas app. The canvas app ID can be found on Power Apps, go to **Apps**, select the canvas app, and then select **Details** on the command bar.
61
+
-**Static value**: Enter the app ID for an existing canvas app. More information: [How to find the unique name and app ID for a canvas app](#how-to-find-the-unique-name-and-app-id-for-a-canvas-app)
64
62
65
63
-**Show component on**. Specifies the client type to display the embedded canvas app. Choose from **Web**, **Mobile**, and **Tablet**.
66
64
:::image type="content" source="media/add-canvas-app-control.png" alt-text="Add the canvas app control to a table column.":::
67
-
68
-
10. Select **Done**. Then, to publish your app to make it available to users, select **Publish**.
65
+
66
+
1. Select **Done**. Then, to publish your app to make it available to users, select **Publish**.
69
67
70
68
After you have published an embedded canvas app to your model-driven form, share your embedded canvas app with other users. More information: [Share an embedded canvas app](share-embedded-canvas-app.md).
71
69
72
70
When users open a model-driven app that includes the form you have modified, they see the embedded canvas app on the form. Changing the record displayed on the main form changes the data context that is passed to the form, and the embedded app refreshes to show the relevant data.
73
71
74
72
This article showed you how to get started with embedding a canvas app in a model-driven form. You can further customize the embedded canvas app to connect and bring in data from various data sources. Use the Filter, Search, and LookUp functions and the context passed in from the host model-driven form to filter or find specific records in those data sources. Use the WYSIWYG canvas app editor to easily design the interface to match your requirements.
75
73
74
+
## How to find the unique name and app ID for a canvas app
75
+
76
+
The canvas app control looks for the canvas app first by using the *unique* name found in the **App name** field. If a canvas app with that unique name can't be found in the environment, the canvas app control next uses the specified value in the **App ID** field to load the canvas app. Although you must enter values in both the App name and App ID fields, only one of the values needs to be accurate for the embedded canvas app to load in the control. Note that the canvas app must be in the current environment.
77
+
- The **App name** field is the unique name of the canvas app. To find the unique name, add the canvas app to a solution. The canvas app unique name is displayed in the **Name** column and appears in the form *solutionpublisherprefix_appnamenospaces_appendix*. For example, *contoso_canvasappwithsharepointlist_5ee16*.
78
+
:::image type="content" source="media/canvas-app-unique-name.png" alt-text="The unique name of a canvas app is displayed from the Solutions area" lightbox="media/canvas-app-unique-name.png":::
79
+
- The **App ID** property specifies the ID of the embedded canvas app. Enter the App ID for an existing canvas app. The canvas App ID can be found on Power Apps, go to **Apps**, select the canvas app, and then select **Details** on the command bar.
80
+
76
81
## Embed a canvas app using the classic experience
77
82
78
83
1. Sign in to [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
@@ -89,7 +94,7 @@ This article showed you how to get started with embedding a canvas app in a mode
89
94
10. On the **Column Properties** dialog box, in the list of controls select **Canvas app**, and then select the **Web** option.
90
95
11. In the section below the controls list, the lists of properties available to the canvas app control are displayed.
91
96
- The **Table name** property specifies the table that will provide the data to your embedded canvas app. It will be set to the table that contains the column you added in an earlier step.
92
-
- Notice that, even though this property appears changeable, changing it has no effect on the embedded canvas app. It is meant only to serve as a reference for you.
97
+
- Notice that, even though this property appears changeable, changing it has no effect on the embedded canvas app. It's meant only to serve as a reference for you.
93
98
- The **App Name** property specifies the name of the canvas app to embed. The model-driven form looks for the canvas app with the specified name in the current environment. If a canvas app with that name can't be found in the environment, the canvas app control will use the App ID to load the canvas app. Enter the App Name for an existing canvas app.
94
99
- The **App ID** property specifies the ID of the embedded canvas app. You can enter an App ID for an existing canvas app or an App ID will be automatically generated and filled-in for you when you create or edit a canvas app by selecting **Customize**. The canvas App ID can be found on Power Apps, go to **Apps**, select the canvas app, and then select **Details** on the command bar.
95
100
@@ -98,19 +103,19 @@ This article showed you how to get started with embedding a canvas app in a mode
98
103
>
99
104
> If neither the App Name or App ID match an existing canvas app, the form displays the message "Sorry, we didn't find that app."
100
105
101
-
12. Go to step 20 if you're adding a completed canvas app. If you are creating a new or editing an existing canvas app, continue to follow these steps. Select **Customize** to create or edit a canvas app. This opens Power Apps Studio in a new tab.
106
+
12. Go to step 20 if you're adding a completed canvas app. If you're creating a new or editing an existing canvas app, continue to follow these steps. Select **Customize** to create or edit a canvas app. This opens Power Apps Studio in a new tab.
102
107
> [!NOTE]
103
108
> If opening Power Apps Studio is blocked due to a web browser pop-up blocker you must enable the make.powerapps.com site or temporarily disable the pop-up blocker and then select **Customize** again.
104
109
13. Observe the following:
105
-
- In Power Apps Studio notice that there is a special **ModelDrivenFormIntegration** control in the left pane. This control is responsible for bringing contextual data from the host model-driven form to the embedded canvas app.
110
+
- In Power Apps Studio notice that there's a special **ModelDrivenFormIntegration** control in the left pane. This control is responsible for bringing contextual data from the host model-driven form to the embedded canvas app.
106
111
- Observe that a [canvas app form control](../canvas-apps/controls/control-form-detail.md) was automatically added to your embedded canvas app and displays the data being passed to it from the host model-driven form via the ModelDrivenFormIntegration control.
107
112
- Select the **View** tab, and then select **Data sources**. Notice that a data source for the parent table of your host model-driven form, Accounts in this case, was automatically added to your embedded canvas app. - Select the **Form1** control and observe that the **DataSource** property is set to **Accounts**.
108
113
- With the **Form1** control still selected, observe that the **Item** property is set to **ModelDrivenFormIntegration.Item**.
109
114
> [!NOTE]
110
115
> The embedded canvas app has full access to read from the host model-driven form via ModelDrivenFormIntegration.Item.
111
116
> As an example, to get the value of a column with the name **accountnumber** and display name **Account Number**, you can use **ModelDrivenFormIntegration.Item.accountnumber** or **ModelDrivenFormIntegration.Item.'Account Number'**.
112
117
18. In the property pane on the right, next to **Columns**, select **Edit columns**.
113
-
19. Select **+ Add column** to add another column to the canvas app form or reorder existing columns using drag and drop. Close the data pane when you are done adding and reordering columns.
118
+
19. Select **+ Add column** to add another column to the canvas app form or reorder existing columns using drag and drop. Close the data pane when you're done adding and reordering columns.
114
119
20. Select the **File** tab, and then select **Save**.
115
120
21. Select the **The cloud** tab. Provide a unique name for the app and then select **Save** located on the lower right. Note the following behavior:
116
121
- Saving an app for the first time automatically publishes the app.
0 commit comments