cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrstian89
Helper IV
Helper IV

Multiple file attachments PowerApps/Dataverse

I have a an app to keep track of equipment at work. I have a database in Dataverse for this.

In PowerApps I have an attachment control to upload a file to the specific item. This works fine for one file, but if I try to upload multiple files, nothing happens.

I have increased MaxAttachments in PowerApps to 5.

 

Is there any way to add multiple files to one File row/column in Dataverse?

Is there a workaround on how to have 5 different columns show up in the same attachment control, for the same item?

1 ACCEPTED SOLUTION

Accepted Solutions
dpoggemann
Super User
Super User

Hi @mrstian89 ,

 

To upload multiple attachments / files you need to look at the following approaches:

1.  Configure SharePoint integration with Dataverse - You will be able to upload as many documents as you really want related to each record and data is stored in SharePoint vs. Dataverse to save space.  https://docs.microsoft.com/en-us/power-platform/admin/manage-documents-using-sharepoint 

2.  You could add an Activity type that would store the attachments.  You would add an attachment field to the Activity and configure your table to have Activities and then you could add multiple attachments with multiple Activities.

3.  You could define multiple file fields on your table, example File1, File2, File3, File4, etc.  Not really a normalized model but then you would populate each of these fields from your Power App.

4.  You could integrate to Azure Blob Storage - Check out @EricRegnier 's great suggestions here https://powerusers.microsoft.com/t5/Microsoft-Dataverse/How-to-integrate-Azure-blob-storage-with-dyn... 

 

These are the techniques I would look at...

 

Please accept if answers your question or Like if helps in any way.


Thanks,


Drew

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

6 REPLIES 6
dpoggemann
Super User
Super User

Hi @mrstian89 ,

 

To upload multiple attachments / files you need to look at the following approaches:

1.  Configure SharePoint integration with Dataverse - You will be able to upload as many documents as you really want related to each record and data is stored in SharePoint vs. Dataverse to save space.  https://docs.microsoft.com/en-us/power-platform/admin/manage-documents-using-sharepoint 

2.  You could add an Activity type that would store the attachments.  You would add an attachment field to the Activity and configure your table to have Activities and then you could add multiple attachments with multiple Activities.

3.  You could define multiple file fields on your table, example File1, File2, File3, File4, etc.  Not really a normalized model but then you would populate each of these fields from your Power App.

4.  You could integrate to Azure Blob Storage - Check out @EricRegnier 's great suggestions here https://powerusers.microsoft.com/t5/Microsoft-Dataverse/How-to-integrate-Azure-blob-storage-with-dyn... 

 

These are the techniques I would look at...

 

Please accept if answers your question or Like if helps in any way.


Thanks,


Drew

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

Thanks! 🙂 
I solved it with a different souliton.

1. Deleted the Column "Attacment" which was a "File"-type.

2. Activated Attachments in the table.

3. Voila!

I thought I had done this earlier, but guess I forgot! But it solved it for me.

Can you Please explain more I am facing same issue I need multiple attachment 

If you have attachments enabled for your Dataverse table, you can add the Attachments field in the Edit Fields property of the Edit Form control. It is not a normal column so you won't see it in the table but it does store the attachments in blob or something and you can view them in a gallery.

shumayl
Frequent Visitor

Following up on this, how do I fetch the attachments stored and use it in Automate flows e.g. to send as attachments in an email?

 

I can view the attachments in Power App, but I have no idea how to get them in Automate. 

shumayl
Frequent Visitor

Responding to my previous reply just in case someone out there is wondering where attachments are stored when they are Patched from Power App onto an entity in Dataverse (not file columns). 

 

The attachments are stored in a separate table called `Notes`. You can obtain your attachments by filtering the `Notes` table with the following OData query expression:

 

 

 

 

_objectid_value eq @{triggerOutputs()?['body/cr000_yourtableentityid']}

 

 

 

shumayl_0-1655969959920.png

 

You can then loop over all the attachments and store them inside an array as you would for attachments in SharePoint List. If you want to attach these in an email/Approval, just make sure to encode them in binary as they are initially stored in base64. For email, change the `content` JSON key to `ContentBytes` instead:

 

shumayl_1-1655970018599.png

 

More info:

Annotation (note) table (Microsoft Dataverse) - Power Apps | Microsoft Docs

Solved: The $filter expression must evaluate to a single b... - Power Platform Community (microsoft....

Solved: Approvals Error - Power Platform Community (microsoft.com)

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,972)