Public Preview of File attribute in Power Apps
We are pleased to announce the Public Preview availability of the File data type for use in Power Apps. The Common Data Service (CDS) team has announced (here and here) the availability of the File data type for entities. This CDS feature is in addition to the existing attachment functionality (which allows files) and allows an entity to have one or more fields on an entity with a file data type. Some regions already have this capability as it is midway through the deployment to all regions. We expect it to be in all regions in a few weeks.
If your Common Data Service environment has the File data type capability, then the portal and Power Apps maker studio will automatically show the File data type as a capability.
Setting the File data type on a field
To set the File data type on an entity field, add a new field and choose File for the data type.
Note that the default size setting is 32,768 Kb. This value is settable. For instance, you may wish to limit the overall size of the file to 10 MB. The file data type can store most files. Executable files are not allowed (e.g., “.exe”, “.com”, “.bat”.)
Using a field with a File data type in Power Apps
When you choose a field that has a File data type, Power Apps will automatically choose a control that works with files. This is same control that is used for Attachments except that it only allows a single file for a File data type field. If you want multiple files, use the attachment feature.
In this example a field named “EssaySubmital” has a File data type and the control shows a File “A tree poem.docx” that has been added to the record.
For an edit form the attachment control serves as well — though limiting to a single file.
Finally, when the user is working with your application and double clicks on a file name in the control, it will downloaded in the browser for the user to open directly.
This feature is in Preview and we love to hear from you. Please share your feedback on your experience with the File data type in the comments below or on the PowerApps community forums.