Embed a Canvas App in the model driven app

How to embed a canvas app in your model driven app

Do you want to create a button in the forms in your model driven app? You could embed a Canvas App in your model driven app to do this.

Create a solution

I will start this post my creating a solution in Power Apps. This solution will hold the canvas app that I’m creating and the Model Driven App that I’m about to create.

How to embed a canvas app in your model driven app Microsoft Power Apps Create a new solution

First I’m going tot add the Account table as I want to add a Canvas app to the form for the Account.

How to embed a canvas app in your model driven app Microsoft Power Apps Add a Table to my solution

Now I’m adding a column called Canvas App to my table. You could use any required column you like. For this post however I created a new column.

How to embed a canvas app in your model driven app Microsoft Power Apps CanvasApp Requried column in my Table

Create A Canvas App

I will create a simple canvas app inside my solution and I’m adding a button to this app. Once I’ve save and published the app, I have an app that will look like this:

How to embed a canvas app in your model driven app Microsoft Power Apps Create A Canvas App

Now that I have a canvas app and a column that will hold my app I can create a new model driven app.

Create a model driven app

My model driven app will only have the Accounts table included. You will probably find that in your apps you might have more tables included. It all depends on which tables/entities you want to use to embed a canvas app in.

How to embed a canvas app in your model driven app Microsoft Power Apps Create a Model Driven App

Note that in my site map I’m selecting for the Entity the Account table.

How to embed a canvas app in your model driven app Microsoft Power Apps Site Map for Accounts App

Then I can edit the form for my table.

How to embed a canvas app in your model driven app Microsoft Power Apps App after Site map has been created

Connect a Column with a Canvas app

In the forms editor you will notice the add component option. In the Microsoft documentation the same options are also shown in the classic interface, but there is no real need to use the classic UI anymore.

How to embed a canvas app in your model driven app Microsoft Power Apps Add Component

Now it is time for the exciting part of this post. Embed a Canvas app into your Model driven app.

Embed a Canvas App

There are 3 options here. You could for example store the App id of the canvas app in a column and then use this to start your app. Just imagine starting a different app depending on where you are in your process.

How to embed a canvas app in your model driven app Microsoft Power Apps Add canvas App

I’m going to use the easiest option whereby I’m setting the app id to a hard coded value.

First I will need to collect the App id of the Canvas app. By selecting Details from the apps menu.

How to embed a canvas app in your model driven app Microsoft Power Apps Details of the Canvas App

now I will get to the following screen where the App Id is shown.

How to embed a canvas app in your model driven app Microsoft Power Apps Details of the Canvas App showing App ID

A Quick copy and past of the app id will now help me to embed a canvas app in my model driven app.

Embed a Canvas App

Now I just need to publish the solution and test the app.

Test the App

Now when I open an account in my models driven app I can see that my Canvas app is appearing.

How to embed a canvas app in your model driven app Microsoft Power Apps Play the App and the Canvas App appears

In this post I only added a button which for example could start a flow, but of course there are a lot more options available within your Canvas apps.

How are you planning to use this? Let me know and leave a comment below. I’m interested to hear your stories.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: