web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Upload multiples files...
Power Apps
Suggested Answer

Upload multiples files to dataverse table

(1) ShareShare
ReportReport
Posted on by 565
Hi all,
 
Viewing these videos, I created a dataverse table for register Invoices data and another table for the Invoices Attachments:
 
 
I made my tasks and I get some issues:
 
First, when I copy and paste the attachment control outside the form (DataCardValue) , the option to "Upload file" is missing, I am using a form connected with a dataverse table inside Teams.
 
 
Second, If I keep the attachment control of the form anyway and I type this formula on the Success event of the form:
 
Creating a record on the Invoices Attachments table based on the Attchament control of the form.
 
ForAll(DataCardValue254.Attachments ,
 
Patch(Inventory_Invoices_Attachments, Defaults(Inventory_Invoices_Attachments),
 
{
Name:frmInvoice.LastSubmit.Name,
Invoice:frmInvoice.LastSubmit,
File:{FileName:ThisRecord.Name , Value:ThisRecord.Value}
 
}
));
 
It does nothing, it does not enter in the loop.
It is like the control DataCardValue254.Attachments is empty after the form submit.
And If I do Countrows(DataCardValue254.Attachments) before submit the form, it counts the amount of attachments well.
 
Any idea about it?
 
Thanks for any help!
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,569 Super User 2025 Season 2 on at
     
    My recommendation, as there are .... other ways, is simply to change your initial action to be a Patch to the first table, do not do a Submit.
     
    I know I know but Michael its a form... don't care what you want to happen either you need to capture all the data from the attachments into a Collection PRIOR to submitting, from the Attachments control, then in the Onsuccess loop through the Collection NOT the control
     
    or change the first to a Patch, wrapped in an IfError or one of its variants and if it succeeds, then do your code below.
     
    one of those 2 will solve your issue :-)
  • Suggested answer
    sumitkp Profile Picture
    6 on at
     
    • Regarding "when I copy and paste the attachment control outside the form (DataCardValue) , the option to "Upload file" is missing"
    The copy of Attachments control from form used to work before but now it isn't maybe due to some bug but a workaround for that is to hold and drag the control under Tree View to outside of the form and from there you should be able to use it.

     
    • If you meant to use the Attachments control outside of the Form to upload multiple files, then you could use Power Automate for that purpose as stated here: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/file-column-data?tabs=webapi , there are 3 ways to upload a file to a file column in Dataverse which are: 
      • Use Dataverse messages available to both the SDK and Web API
      • Upload a file in a single request using Web API
      • Upload the file in chunks using Web API
     
    • If you meant to use the Attachments control inside the Form:
      • Unfortunately, I am getting a readonly column for File Column in Dataverse.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 546 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 287 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 195 Super User 2025 Season 2

Last 30 days Overall leaderboard