Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Add Data to a Dataverse Table in Power Apps (Form, Import, Patch and Collect)

Typing a request straight into the Dataverse grid is fine for one row. The SPGuides service desk wanted more: techs logging requests from a canvas app, quick test rows, and a path for their spreadsheet.

In this tutorial, we’ll cover how to add data to Dataverse four ways: New row in the table editor, the two Import commands, Patch from a canvas app, and Collect for several rows at once.

We’ll also fix the server error that blocked a Patch without a customer.

Here’s what we’re building: a canvas app button that writes a Service Request row and confirms it with a green banner.

Power Apps preview with the green Added Laptop Setup banner and the new Laptop Setup row at the top of the gallery

Before You Start

You need a Power Apps license that covers Dataverse and a security role that can create rows in the table. New to the platform? Read what Microsoft Dataverse is first. In Dataverse, a table holds rows (records) made of columns (fields).

I built everything in my Power Platform developer environment on a Service Request table (plural name Service Requests). If you still need a table, here’s how to create a table in Microsoft Dataverse. These are the columns we fill:

ColumnTypeNotes
SubjectText (primary column)The only required column
Request NumberTextPlain text, not autonumber; display name has a trailing space
StatusChoiceOpen, In Progress, Closed; Power Fx calls it ‘Status (cr85a_status)’
PriorityChoiceLow, Medium, High
CustomerLookup to CustomersAmy, Bob, Cleo, Dan, Eve
Due DateDateWe set today + 7 days

Before the tests, the table held eight rows, such as Hardware Repair (REQ-1000), Network Issue (REQ-1006) and Monitor Flicker (REQ-1009).

Step 1: Add a Row in the Table Editor

The fastest way to add one row needs no app at all.

  1. Go to make.powerapps.com, pick your environment, and select Tables.
  2. Open Service Request and select Edit to open the table editor.
  3. Open the New row menu. Pick New row for an inline grid row, or New row using form for the full form.
Dataverse table editor New row menu with New row and New row using form options

We chose New row using form. It opens the table’s Main Form, the same one a model-driven app uses. I typed Monitor Setup in Subject, picked Dan as the customer, and selected Save & Close.

New Service Request main form with Subject Monitor Setup and the Save and Close button

Until you pick a customer, the form shows “Enter Customer details.” Remember that message for Step 4.

Checkpoint: Monitor Setup appears in the grid with customer Dan.

Step 2: Import Many Rows from Excel or a Dataflow

For dozens or thousands of rows, don’t type. On the table page, open the Import menu:

Dataverse table page Import menu with Import data with Dataflows and Import data from Excel
  1. Import data from Excel takes an Excel or CSV file. Select the table, upload the file, check that Mapping status reads Mapping was successful, then select Import.
  2. Import data with Dataflows opens Power Query. Pick a source (SharePoint, SQL Server, OData, a file and more), shape the data, map it to the table, and refresh it manually or on a schedule.

Tip: export the table first and use that file as your template. See how to create a Dataverse table from Excel or CSV for the Excel side and our dataflow in Dataverse guide for Power Query.

Limits: you need the Environment Maker role, multiselect choice, image and file columns can’t be imported, and neither command is included in the Power Apps Developer Plan.

Checkpoint: you can see both commands on your table’s Import menu.

Step 3: Add a Row from a Canvas App with Patch

Now the app. First, build the screen:

  1. On make.powerapps.com, select Create > Start with design > Blank canvas app, and pick Tablet.
  2. Select Data > Add data, search Service Requests, and add the Dataverse table. Add Customers the same way.
  3. Insert a text input txtSubject (default Printer Setup), a dropdown drpPriority, a combo box cmbCustomer and a button btnPatch.
  4. Set drpPriority’s Items to Choices('Priority (Service Requests)'), and cmbCustomer’s Items to Customers with display field Customer Name.

To set a property, select the control, pick the property in the dropdown left of the formula bar (fx), and type. Then select btnPatch, choose OnSelect, and paste:

Set(varNew, Patch('Service Requests', Defaults('Service Requests'), {
    Subject: txtSubject.Text,
    'Status (cr85a_status)': 'Status (Service Requests)'.Open,
    Priority: drpPriority.Selected.Value,
    Customer: cmbCustomer.Selected,
    'Due Date': DateAdd(Today(), 7, TimeUnit.Days)}));
Notify("Added " & varNew.Subject, NotificationType.Success)
Power Apps Studio btnPatch OnSelect Patch formula with Customer cmbCustomer.Selected and the Add with Patch button

Patch writes to a data source. With Defaults('Service Requests') as the base record, it creates a row instead of editing one, and returns the new record, which we keep in varNew.

For the lookup, pass the whole Customers record: cmbCustomer.Selected. The choice column takes an enum value like 'Status (Service Requests)'.Open, which our Dataverse choices guide explains.

To test, press F5 (or Play, top right), or Alt+click the button in the editor. A gallery with Items FirstN(Sort('Service Requests', 'Created On', SortOrder.Descending), 8) shows new rows first, and the Notify function shows the banner.

Checkpoint: a green banner reads Added Laptop Setup and the row tops the gallery. Save with Ctrl+S.

Step 4: Catch the Error When a Required Value Is Missing

Next, I wanted to see what fails. This button patches a row with only a Subject:

Patch('Service Requests', Defaults('Service Requests'), {Subject: "Missing Customer Test"})

Studio showed no design-time error, but in Preview it gave a red banner and created no row:

Network error when using Patch function: [Service Requests] Enter Customer details.
Power Apps preview red banner Network error when using Patch function Enter Customer details

The twist: Customer isn’t a required column (required level None). The block comes from a server-side rule on this table, the same one behind the form message in Step 1. “Network” is misleading here.

Don’t let the user guess. Wrap the Patch in IfError and show the real message:

IfError(
    Patch('Service Requests', Defaults('Service Requests'), {Subject: "Missing Customer Test"}),
    Notify("Not saved: " & FirstError.Message, NotificationType.Error)
)

Checkpoint: the failed save shows your own message and the gallery doesn’t change.

Step 5: Add Several Rows at Once with Collect

Collect adds records to any data source, not just collections. Give it a table and each record becomes its own row. We used ForAll(Sequence(5), ...) to build five test rows:

Collect('Service Requests', ForAll(Sequence(5), {
    Subject: "Delete Test " & Value,
    'Status (cr85a_status)': 'Status (Service Requests)'.Open,
    Customer: cmbCustomer.Selected}))
Power Apps Studio btnBulk OnSelect Collect ForAll Sequence formula and the Add 5 test rows button

Sequence(5) returns the numbers 1 to 5 in a column named Value, so the subjects read Delete Test 1 to Delete Test 5. Collect isn’t delegable, which matters for reads, not for adding a handful of rows. More on that in our Power Apps delegation guide.

Power Apps preview gallery with Delete Test 1 to 5 rows at the top and the Add 5 test rows button

Checkpoint: five Delete Test rows (customer Amy) appear at the top of the gallery within a few seconds.

Test the App

Here’s what my 10/21/2026 run in Preview produced:

ButtonResult
Add with PatchRows Printer Setup and Laptop Setup (customer Amy) created; banner “Added Laptop Setup”
Patch without CustomerRed “Enter Customer details.” banner; no row created
Add 5 test rowsDelete Test 1 to Delete Test 5 created

Need to clear the test rows afterward? We covered that in delete all records from a Dataverse table, using the same five rows.

Make It Production-Ready

  • Wrap every Patch and Collect in IfError; reset inputs only after a good save.
  • Pass a full record to lookups (combo box or LookUp), never a name.
  • Build the app and table inside a solution so they move together to test and production.

Troubleshooting

Request Number is blank. My first banner used varNew.'Request Number ' and said only “Added”. It’s plain text, not autonumber. Set it in the Patch, or set up autonumber in Dataverse.

“Name isn’t valid” on Request Number. The display name ends with a space, so Power Fx needs 'Request Number ' with the space.

Priority looks wrong. My Printer Setup row showed Medium in the grid while the dropdown showed Low. Check choice values in the table after your first test run.

Where to Take It Next

More builds like this one are on our Power Apps tutorials hub.

If you’re planning a bigger Dataverse app, these are worth a read next:

Frequently Asked Questions

How do I add data to a Dataverse table?

Use New row in the table editor for single rows, the Import menu for Excel or dataflows, Patch or Collect in a canvas app, or Add a new row in Power Automate.

How do I add a new record to Dataverse with Patch?

Use Patch with Defaults as the base record: Patch(‘Service Requests’, Defaults(‘Service Requests’), {Subject: “Printer Setup”, Customer: cmbCustomer.Selected}). See the Patch function reference.

How do I import Excel data into an existing Dataverse table?

Select Tables, open Import > Import data from Excel, pick the table, upload the file and select Import once mapping succeeds. Microsoft documents the limits in Import data from Excel and export data to CSV.

Why do I get “Network error when using Patch function” in Dataverse?

Read the text after it. In our test it was “Enter Customer details.”, a server rule on the table, not a network problem.

Can I add multiple rows to Dataverse at once from Power Apps?

Yes. Pass a table to Collect, for example Collect(‘Service Requests’, ForAll(Sequence(5), {Subject: “Delete Test ” & Value, Customer: cmbCustomer.Selected})). Each record becomes its own row.