How to Create Dataverse File Field [With Examples]

When I was building an internal Power Apps solution for one of our teams, we needed a way to store documents directly inside Dataverse, things like invoices, agreements, and small supporting files. At first, it looked simple, but once we started working on it, questions came up:

How much file size does Dataverse support? Can we upload ZIP files? How do we manage storage costs? How do users upload or download files from a Dataverse form?

In this article, I’ll explain everything about working with file columns in Dataverse, including:

  • How to add a file column to your Dataverse table and Power Apps form
  • How to delete a Dataverse file
  • Download files from Power Apps
  • Dataverse file size limits
  • Zip file upload limits
  • How Dataverse stores files
  • Storage pricing

So let’s get started!

Dataverse File Field

To store binary data (such as documents, images, or attachments) in a Dataverse table, we can use the File column. This column is useful when we need to save a single image, document, or any other file attachment.

We can add a File column to an existing table or create a new table with this column type.

By default, the maximum file size is 32 MB, and it can be increased up to 128 MB (131,072 KB) per column. Once a file size limit is saved, it cannot be changed later.

Each File column can have its own size limit, depending on our requirements.

Also, Dataverse File columns do not support business process flows, business rules, charts, rollup columns, or calculated columns.

Create a File Column in a Dataverse Table

Let’s say we have a custom Dataverse table called Job Seekers Registration. In this table, we will create a file field named Candidate Documents to store various types of attachments, such as images, notes, and more.

To create a file column in the Dataverse table, click on + New column and fill in the details as shown below:

FieldsDescription
Display nameEnter the name of the file column (for example, Candidate Documents). This field is required.
DescriptionThis is optional. You can add a brief note about why you are creating this column.
Data typeExpand the dropdown, go to File, and select File as the data type.
RequiredSpecify the requirements of the table. There are three types of requirements: Business recommended, Business required, and Optional.
SearchableThis option is turned off by default and cannot be enabled for a file column.
Schema nameThis is automatically generated from the display name and includes the Dataverse prefix. Once the table is saved, you cannot change it.
Maximum file sizeThe default limit is 32 MB, and once you save the column, this size cannot be changed.
Enable column securityTurn this on if you want to control who can access this column.
Enable auditingEnable this to track changes or access to the column and review them later.
SortableThis setting determines how the column behaves in interactive dashboards.
Create Dataverse File field

Once everything is done, click on Save. After a while, the file column will be created in the existing dataverse table.

How to Create Dataverse File Field

The created file field will be visible when you navigate to the table’s Columns section, as shown below.

Create a Dataverse File field

This way, we can create a file column in the Dataverse Table.

How to Add a File Column to a Dataverse Form

We will now look at how to add a file column to a Dataverse form. This will allow users to upload or download attachments directly from the form. Just follow the steps below to add the Dataverse file field to the main form.

Step – 1:

First, expand the Dataverse (from the left navigation) -> Tables -> Select the specific Dataverse table (Job Seekers Registration List). In the Dataverse list, select Forms under the Data experiences section.

How to add file column to Dataverse Form

Step – 2:

After opening the Dataverse forms page, you may view three different forms. Click on the Information Main form as shown in the screenshot below.

Add file column to Dataverse Form

Step – 3:

Here, we will insert the file column at the bottom section of the form. Go to Table columns from the left navigation. Search the file column name (Candidate Documents).

Add a file field to Dataverse Form

Step – 4:

Once we got the file column under the table column (Candidate Documents), we need to drag and drop the field in the bottom section of the form, as shown in the image below.

Add dataverse file field to Form

Step – 5:

The file field (Candidate Documents) has now been added to the form, as we can see. But until we create and save a record in the Dataverse table, the file field will remain locked. Save and publish the Dataverse form when you’re finished.

How to add file field to Dataverse Form

Step – 6:

Now we will create a new record in the Dataverse table (Job Seekers Registration List), including the File column (Candidate Documents). Click on the Edit button in the Dataverse list -> Expand + New row -> Select New row using form as shown below.

How to insert file field to Dataverse Form

Step – 7:

The form shown below will then display, allowing us to add a new entry to the Dataverse list. Here, we can see the file column appears with a notification like “This record hasn’t been created yet. To enable file upload, create this record“. This message states that we must create a record in any case before the file field becomes active.

Dataverse file field to Form

Step – 8:

To create a record, enter a Name or Title (Remya), then use the Save option to save the form.

Insert to file field to Dataverse Form

Once the entry has been saved, we can see that the file field (Candidate Documents) will prompt you to select a file from your system.

Add a file column to Dataverse Form

Step – 9:

To upload any document or file, click on the Choose File option and then select any file from your system. Click on Open.

Dataverse File column to Form

Step – 10:

If you need to download or save a particular file or document from the Dataverse form, click the file name (link). As soon as we select the Save option, we will be prompted to choose a directory on our system, after which the file will download. As soon as you’re done, remember to save the dataverse form.

Add Dataverse File column to Form

This way, we can add a Dataverse file field to the form.

Download Dataverse File From Power Apps

Now we will see how to download the Dataverse attachment from the Power Apps application.

  • Open a Power Apps Canvas app. On the Power Apps Screen, insert a Button control and set its Text property to DOWNLOAD.
How to download Dataverse file from Power Apps
  • Select the Button control (DOWNLOAD) and apply the code below to its OnSelect property:
OnSelect = Download("https://org50e260af.crm8.dynamics.com/api/data/v9.0/crf9a_jobseekersregistrationlists(866eb592-2f3f-ed11-bba2-002248d5deda)/crf9a_candidatedocuments/$value?size=full")

Where,

  • Download = A file from the web is downloaded to the local device using the Power Apps Download feature.
  • https://org50e260af.crm8.dynamics.com/api/data/v9.0/” = This is the organization URL. You can find this URL by hovering over the file link in the Dataverse form. The file link is visible at the bottom of the form.
power apps download file from dataverse
  • crf9a_jobseekersregistrationlists = This is the internal name or schema name of the Dataverse table. Once you edit the dataverse table, you may locate the schema name. But it takes the plural name of the table. Here, my table Display name is Job Seekers Registration List, and the Plural name is Job Seekers Registration Lists.
Dataverse download file from Power Apps
  • 866eb592-2f3f-ed11-bba2-002248d5deda = This represents the file ID. From the top URL link shown below, you can get the specific file ID.
PowerApps download file from dataverse
  • crf9a_candidatedocuments = This is the internal or schema name of the File column. You can view this name once you edit this file column.
Dataverse download file from PowerApps
  • The total structure of the Power Apps looks like the screenshot below.
Download file from dataverse
  • Finally, save, publish, and preview the app. Click on the DOWNLOAD button to download the Dataverse file. Next, it will ask you for the path where you want to store the file on your system, and then save it. The supplied path will be applied to download the particular file.

This is how to download the Dataverse file from Power Apps.

How to Delete a Dataverse File

Let’s say we uploaded a file called financial.csv to the Dataverse form, and later realized it isn’t needed. In that case, we need to delete it.

In the File column, you will see a Delete option that allows you to remove the file from the Dataverse field. When you select Delete, a confirmation pop-up will appear asking if you are sure you want to delete the file. Click OK to remove it, or Cancel if you change your mind.

The screenshot below shows how the file field looks after the attachment has been deleted.

Dataverse Delete File

Dataverse Zip File Limit

The Dataverse File column accepts zip files. The largest file that can be uploaded individually is 3 GB.

Dataverse File Storage

In the Dataverse, you can see the total file storage capacity in the Power Apps Admin Center.

  • On the Power Apps Home page, click the Gear icon (top-right of the page) -> Admin center.
Dataverse file storage
  • Expand Resources and select Capacity from the left menu. After selecting it, you will be able to see your file storage usage, storage breakdown by source, and other details.
  • Under Storage capacity by source, you can check how much space is available for both data and files. The Database section shows how much data is stored in Dataverse, and the Files section shows how much file storage remains.
File storage in Dataverse

Dataverse File Storage Pricing

The default environment includes 3 GB of Dataverse database capacity, 3 GB of Dataverse file capacity, and 1 GB of Dataverse log capacity.

The capacity for the following environments, which are shown as 0 GB, is not used:

  1. Microsoft Teams
  2. Trial
  3. Preview
  4. Support
  5. Developer

The table below represents all the file storage pricing in Dataverse.

Type of StorageDescriptionDefault Storage CapacityPrice ($ per GB per month)Dynamics 365 applications and Power Apps provide storage for emails’ attachments and comments, notes (word files, image files, pdf, spreadsheets, videos, and other files)
DatabaseStorage for record data and item definitions10 GB40@250 MB per user
LogsStorage space for audit logs that track changes to records and attributes (including field value updates, security role modifications, and date/time of access)2 GB10None
FilesDynamics 365 applications and Power Apps provide storage for emails’ attachments and comments, notes (Word files, image files, PDF, spreadsheets, videos, and other files)20 GB2@2 GB per user

To know more details, refer to the MSDN: Dataverse file storage pricing

This Dataverse tutorial explained what a Dataverse File field is and how to use it in a Dataverse table. We also covered how to add a file field to a Dataverse form using a few simple scenarios.

Also, you may like some more Dataverse tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App