Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft Dataverse is a secure, cloud-based data platform for business data. In Power Apps, you can create canvas apps that connect directly to Dataverse to display, add, update, and manage records without setting up a separate database.
This article shows three ways to build a canvas app with Dataverse:
- Start with an existing Dataverse table.
- Create new Dataverse tables and generate an app.
- Build a blank app and connect it to Dataverse yourself.
Prerequisites
Before you start:
- Switch to an environment that already has a database with sample data. If you have the right license, you can also create an environment.
- Make sure that you have the Environment Maker security role, either directly or through a Dataverse team that uses the Microsoft Entra ID security group category. Custom security roles aren't currently supported for canvas app maker scenarios.
Create an app
Sign in to Power Apps.
On the home page, choose one of the following options based on how you want to build your app with Dataverse.
Create options using Dataverse Benefits Navigation A single-page gallery app Use existing business data in Dataverse to create a lightweight responsive app quickly. Select Start with data > Dataverse. Select a table, and then select Create app. Create new data and build an app Create structured tables in Dataverse so you can build secure and scalable apps around new business data. Select Start with data > Create new data. Use the table designer or Copilot to create tables, and then select Save and exit. Blank app that uses data from Dataverse Start with a blank app when you want full control over the layout, screens, and controls. In the left navigation pane, select Create > Create from blank > Phone size. Power Apps creates the app and opens Power Apps Studio, where you can continue building.
Start with data using Dataverse
The Start with data experience helps you quickly connect to an existing Dataverse table or create a new table and generate an app.
Connect to an existing Dataverse table
- Sign in to Power Apps.
- On the home page, select Start with data.
- On the Create an app page, select Dataverse.
- Select an existing Dataverse table, and then select Create app.
Power Apps Studio opens with a gallery app that is already connected to the selected table.
Create new data
If you don't already have a table, create one directly from the Start with data experience.
- On the home page, select Start with data.
- Select Create new data.
- In the Create new tables designer, choose one or more of these actions:
- Select + New table to create a table.
- Select + Existing table to add an existing table.
- Use Copilot to describe the tables, columns, rows, and relationships that you need.
- Select Import data in the Copilot pane to import data from Excel, .CSV files, or SharePoint lists.
- When you finish defining your tables, select Save and exit to generate the app.
Add a Dataverse table in a blank app
If you want to understand the building blocks of a Dataverse app, start with a blank app and add the data source yourself.
Sign in to Power Apps.
In the left navigation pane, select Create > Create from blank.
Select an app size.
When Power Apps Studio opens, go to the app authoring menu and select Data.
Note
If this is your first time connecting to Dataverse, Power Apps prompts you to create a connection. Select Create to continue.
Select Add data, enter Accounts in the search box, and then select it. And close the Data pane by selecting the close icon in the upper-right corner.
Add a list screen
On the command bar, select New screen > List.
In the left navigation bar, select BrowseGallery1, and then set the Items property to this formula:
SortByColumns(Search(CustomGallerySample, TextSearchBox1.Text, SampleText), "SampleText", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))This formula does the following:
This expression filters the CustomGallerySample table for records whose SampleText column contains the text entered in TextSearchBox1. It then sorts the filtered results by the SampleText column in descending order when SortDescending1 is true; otherwise, it sorts them in ascending order.
You can use these and many other functions to control how your app looks and behaves.
In the gallery's Properties pane, set Layout to Title.
Edit the Title text property and rename it to Browse. For more information, see Customize a gallery.
In the left app authoring pane, hover over Screen1, select the ellipsis icon (...), and then select Delete.
In the left app authoring pane, hover over Screen2, select the ellipsis icon (...), and then select Rename.
Type or paste BrowseScreen, and then rename the gallery in that screen to BrowseGallery.
Add a form screen
Repeat the first step in the previous procedure, but add a Form screen instead of a List screen.
Set the form's DataSource property to Accounts and its Item property to BrowseGallery.Selected, as shown on the Advanced tab of the right-hand pane.
On the Properties tab of the right-hand pane, in the Fields row select the "N selected" link (or the Edit pencil) to open the Fields pane.
Select Add field, choose these fields, and then select Add:
- Account Name
- Address 1: Street 1
- Address 1: City
- Address 1: ZIP/Postal code
- Number of Employees
- Annual Revenue
Note
Outside of this scenario, you can create a custom field by selecting New field, entering the required information, and then selecting Done. For more information, see Create a column.
Set the title bar's Text property to show Create/Edit.
The screen reflects your changes.
Rename this screen FormScreen.
Configure icons
On BrowseScreen, set the OnSelect property of the circular icon near the top of the screen to this formula:
Refresh(Accounts)
Set the OnSelect property of the plus icon to this formula:
NewForm(EditForm1); Navigate(FormScreen, ScreenTransition.None)
Set the OnSelect property of the first arrow that points to the right to this formula:
EditForm(EditForm1); Navigate(FormScreen, ScreenTransition.None)
On FormScreen, set the OnSelect property of the cancel icon to this formula:
ResetForm(EditForm1);Navigate(BrowseScreen, ScreenTransition.None)
Set the OnSelect property of the checkmark icon to this formula:
SubmitForm(EditForm1); Navigate(BrowseScreen, ScreenTransition.None)
On the Insert tab, select Icons, and then select the Trash icon.
Set the Trash icon's Color property to White and its OnSelect property to this formula:
Remove(Accounts, BrowseGallery.Selected); Navigate(BrowseScreen, ScreenTransition.None)
Test the app
- On the actions menu, select the play button to Preview the app. For more information, see Preview an app.
- Toggle the list between ascending and descending sort orders. Filter the list by one or more characters in the account name.
- Add an account, edit the account that you added, start to update the account, cancel the changes, and then delete the account.