Skip to main content

Notifications

Community site session details

Community site session details

Session Id : gIjN2Ki4Js+iIaR1BIKxc4
Power Apps - Building Power Apps
Unanswered

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

Like (1) ShareShare
ReportReport
Posted on 13 Feb 2025 18:30:14 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:
  • Lyondenn Profile Picture
    23 on 14 Feb 2025 at 13:56:56
    Download multiple files from Gallery (Collection of MULTIPLE SharePoint Document Libraries)
    @vipuljain03 - thanks for your response!
     
    I tried the code you provided, but it only downloads the first selected item, and not all of them.
  • vipuljain03 Profile Picture
    417 on 14 Feb 2025 at 08:08:44
    Download multiple files from Gallery (Collection of MULTIPLE SharePoint Document Libraries)
    Try the below code in ForAll
     
    ForAll(
        varCheckBox, // Iterate directly over the collection
        Download(ThisRecord.'{Link}' & "action=view")
    );
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,751 Most Valuable Professional

Leaderboard
Loading started