In this blog post we will learn how to use Model driven app with SharePoint data source and how to create a lookup column in a Model driven app in PowerApps.
Model Driven app Data source
- A Model Driven app, is a types of PowerApps applications that you can build in PowerApps. One of the most important parts of a Model Driven app is its data source, which is in charge of giving the app the information it requires to operate.
- A Model Driven App built on the top of data verse, so you must have environment with database to work with Model driven app
- The Dataverse is the recommended data source for Model Driven apps. It is a cloud-based data storage and management service that allows you to store and manage business data in a centralized location.
- Dynamics 365 is another data source that can be used in a Model Driven app. It is a cloud-based business application platform that provides a wide range of business functionality, such as sales, marketing, customer service, and finance.
- In addition to the data sources listed above, Model Driven apps can also use external data sources to provide data to the app. External data sources can include databases, web services, or other applications.
Using external data sources with Model driven app can be more complex than using the built-in data sources, but it can also provide greater flexibility in terms of the types of data that can be used in the app. For example here we will learn how to use SharePoint list in Model driven app.
SharePoint is a popular content management system that can be used as a data source for Model Driven app. We’ll discuss how to connect a Model Driven App with a SharePoint list.
You can use Virtual tables in Dataverse that allow you to access data from multiple tables in your database and present it as a single entity / Table.
So let’s know how to Create virtual table to present the SharePoint list data n Dataverse to use in the Model Driven App.
- Create your SharePoint list if you don’t have yours :
You need to create a SharePoint list with the necessary columns to hold the data you want to use in your Model Driven App. You can create a list by navigating to the SharePoint site where you want to create it and then clicking on “Site Contents” and selecting “New” and “List”.
- Create Virtual Tables in Dataverse:
To create a virtual table in Dataverse, follow these steps:
- Open your Dataverse environment and navigate to the Tables tab.
- Click the New table button to create a new table from external data.
- In the Create Table dialog box, Add connection to your external data.
- At this time you will see SharePoint and SQL connector, in this case we will choose to create SharePoint connection after signing in and creating the connection, a new dialog will appear in the previous page to refresh to see your created connector
- Choose your connection and click the next button on the bottom of your screen
- In the connection details write the SharePoint site URL and click next
- In the Data section choose The SharePoint list that you want to connect to and click Next.
- In the configuration section, you can update the table name and details of the table columns before it is created in Dataverse and after finish click Next.
- Now the Review and Finish step that you will confirm the details of the data source, and how it will be displayed in Dataverse. after review click Finish and it will creating now your virtual table in the Dataverse.
- Now the virtual table contain your SharePoint list with the data and instead during runtime, when a record is required, its state is dynamically retrieved from the associated external system. When you add data from SharePoint or Dataverse you will see this data in both.
You can use this virtual table to create Model driven app that based on the data from the SharePoint list.
You can also use this Virtual table that contain SharePoint list data in a Lookup field in a Model Driven App by following this steps:
- Expand the tables node, and select the table where you want to add the Lookup field.
- Click on the New and then click on the New Column.
- In the New Column dialog box, select the Lookup field type.
- Enter a display name for the Lookup field and select the virtual table that contain your SharePoint data source where you want to look up data from.
- Click on the Save button to save the Lookup field.
- In the table form, add the Lookup field to the form.
- Save and publish the changes to make them available in the Model Driven App.
Once you have completed these steps, you should be able to use the Lookup field in your Model Driven App to look up data from a SharePoint data source.
In conclusion, connecting a Model Driven App with a SharePoint list can be accomplished with a few simple steps. By using SharePoint as a data source, you can create custom business applications that leverage the robust content management features of SharePoint, the best way to connect to SharePoint Data Source in model driven app is by using Virtual tables. Virtual tables in Dataverse provide a simple and powerful way to access data from multiple tables in your database. By consolidating data into a single virtual table, you can improve performance, enhance security, and simplify data access. Creating and using virtual tables in Dataverse is a straightforward process that can help you to get more out of your data and improve your overall productivity.
So this is how to use SharePoint as a Model Driven app Data source.
- Environment Variable In Power Platform With Examples
- How Power Automate Add Working Days To Date?
- How Power Automate Exclude Weekends And Holidays Between Dates?
- How To Debug A PowerApps App?
- PowerApps Business Days Between Two Dates
- How To Use PowerApps DateDiff Function?
- PowerApps Parse JSON Example
- How To Use Switch Function In PowerApps?
- PowerApps Lookup Function Examples : Complete Tutorial
- Have a related question? Please ask it at deBUG.to Community.