Can a Canvas App be embedded into a Model Driven App's screen

| Muhammad Hassan

Can a Canvas App be embedded into a Model Driven App's screen?

A model-driven app follows a data first approach and allows us to quickly add components (e.g. dashboards, charts, forms etc) to our apps in very less amount of time and effort. The customizations that can be made in it is limited. On the other hand, Canvas app is much more customizable and we can drag and drop controls and shape it according to the requirements. However, it takes a lot of time as compared to model driven apps. Both of these have some limitations and some benefits, therefore it would be better to embed a canvas app into a model driven app to get most out of these apps. But is it really possible? The answer is yes. But how do we do that. Let’s discuss.

Model driven apps work on data so we need to bind everything to data. In order to embed a canvas app we will have to bind the canvas app to a field in the form of an entity. Make sure to select a required field because it will only be displayed when there’s data in that field. For our example, I am creating an ‘Employee’ entity.

EMBED-CANVAS-INTO-MODEL-DRIVEN

Here the ‘Name’ field here is required and we will be using this one to bind the canvas app. For this we will add a new section and the ‘Name’ Field there.

EMBED-CANVAS-INTO-MODEL-DRIVEN

Now the canvas app would be binded with the second ‘Name’ field as shown. We will switch to the ‘Classic Editor’ now.

EMBED-CANVAS-INTO-MODEL-DRIVEN

Edit the field and Click on ‘Add Control’ and add Canvas App.

EMBED-CANVAS-INTO-MODEL-DRIVEN

Now select the options where you want to display this app i.e Web, Phone, Tablet. and click on the pencil icon and provide the name of the app and field to bind it with.

EMBED-CANVAS-INTO-MODEL-DRIVEN

Now click on ‘Customize’, which will lead you to the canvas editor.

EMBED-CANVAS-INTO-MODEL-DRIVEN

The current model driven item will be fetched by “ModelDrivenFormIntegration.Item” now you can do whatever you want in this app.

EMBED-CANVAS-INTO-MODEL-DRIVEN

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.


M
Chief Architect, Founder, and CEO - a Microsoft recognized Power Platform solution architect.

About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting