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 / Download multiple file...
Power Apps
Unanswered

Download multiple files from Gallery (Collection of MULTIPLE SharePoint Document Libraries)

(1) ShareShare
ReportReport
Posted on by 23
I have created a Power App to aggregate 5 different SharePoint Document Libraries into one using a Collect. What I want to do is add a checkbox, to the gallery item, and then a button to download all those selected.
 
I think I am running into an issue since these are all disparate Document Libraries, all of which have different URLs.
 
On my gallery check boxes OnCheck property:
Collect(varCheckBox, ThisItem)
On my gallery check boxes OnUnCheck property:
Remove(varCheckBox,ThisItem)
On my Download Selected button's OnSelect property:
ForAll(
    ShowColumns(
        varCheckBox,
        '{Link}'
    ),
    Download('{Link}' & "action=view")
);
Clear(varCheckBox);
Set(
    varResetCheckBox,
    true
)
 
My use of "& "action=view"" is a workaround that I've been using to force file downloads rather than launching in a browser.
 
Clicking Download Selected only downloads the first checked box (first item in the varCheckBox collection. How can I modify what I've done to download everything that is selected?
 
Categories:
I have the same question (1)
  • vipuljain03 Profile Picture
    647 Super User 2025 Season 2 on at
    Try the below code in ForAll
     
    ForAll(
        varCheckBox, // Iterate directly over the collection
        Download(ThisRecord.'{Link}' & "action=view")
    );
     
  • Lyondenn Profile Picture
    23 on at
    @vipuljain03 - thanks for your response!
     
    I tried the code you provided, but it only downloads the first selected item, and not all of them.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard