Migrate embedded canvas apps on model-driven forms created using the public preview release

Important

With the latest release, embedded canvas apps on model-driven forms are generally available. Any embedded canvas apps on model-driven forms created using the public preview release should be migrated to new embedded canvas apps created using the latest release. Support for embedded canvas apps on model-driven forms created using the public preview release will soon be deprecated.

To migrate an embedded canvas app on a model-driven form created using the public preview release to the latest, makers first need to create a new embedded canvas app using the latest release. Makers can then copy over the controls from the existing embedded canvas app to the new one, add required data sources and update broken references, if any. Detailed steps are provided below.

  1. Sign in to Power Apps.
  2. Open the embedded canvas app created using the public preview release for editing in Power Apps Studio. For steps on editing a canvas app see: Edit a canvas app.
  3. In a new browser tab, follow the steps to add a new embedded canvas app on a model-driven form.
  4. Copy the controls from the embedded canvas app created using the public preview release to the new embedded canvas app, one screen at a time using the steps below.
    1. Select the browser tab from Step 2, that has the embedded canvas app, created using the public preview release, open in Power Apps Studio.
    2. Select a screen to copy controls from.
    3. Use Ctrl + A to select all controls on the screen.
    4. Use Ctrl + C to copy all selected controls.
    5. Select the browser tab from Step 3, that has the new embedded canvas app created using the latest release.
    6. Select a screen or add a new one.
    7. Use Ctrl + V to paste the controls on the selected screen.
    8. Repeat the steps to copy each screen.
  5. When you are done copying all the screens, select the browser tab from Step 3, that has the new embedded canvas app created using the latest release.
  6. Update all the places where the row from the host model-driven form is being accessed. Replace First(ModelDrivenFormIntegration.Data) with ModelDrivenFormIntegration.Item.
  7. Add any missing datasources in the new embedded canvas app.
  8. Update all broken references in the new embedded canvas app.
  9. When you are done making changes, select the File tab, and then select Save.
  10. To make your changes available to end-users select Publish and then select Publish this version.

In the preview release, to embed a canvas app on a model-driven form, makers had to decide up front if they wanted to pass the current (main form) row as data context or a list of rows related to the current (main form) row. They then had to add the canvas app control to either the column or sub-grid control.

With the latest release, adding an embedded canvas app on a model-driven form is simplified and streamlined to the column only. Makers can still easily access the list of related rows directly in the canvas app using the Common Data Service connector.

To migrate an embedded canvas app on a model-driven form that uses a list of rows related to the current (main form) row, please follow the steps below.

  1. Follow the steps in the section above to migrate embedded canvas apps on model-driven forms created using the public preview release to the latest.
  2. Using the Common Data Service connector, add a datasource for the related table to the app. To learn how add a data source in a canvas app please refer to Add a data connection to a canvas app in Power Apps.
  3. When using the datasource of the related table for a control such as Gallery or Data table, use the Filter function to filter the rows to the ones that are related to the current (main form) row. The current (main form) row is available via ModelDrivenFormIntegration.Item.

    Note

    The embedded canvas app has full access to row from the host model-driven form via ModelDrivenFormIntegration.Item. 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'.

  4. With recent updates Microsoft Dataverse now also provides support to use table views as a filter. See this blog post for details: Improved data source selection and Dataverse views.

See also

Embed a canvas app on a model-driven form
Add an embedded canvas app on a model-driven form
Edit a canvas app embedded on a model-driven form
Customize the screen size and orientation of a canvas app embedded on a model-driven form
Perform predefined actions on the host form from within an embedded canvas app
ModelDrivenFormIntegration control's properties and actions
Share an embedded canvas app
Guidelines on working with embedded canvas apps