Skip to main content

Notifications

Community site session details

Community site session details

Session Id : M/qH74ojlyqkevkKrj2q14
Power Apps - Building Power Apps
Answered

Select and Download Multiple Files

Like (0) ShareShare
ReportReport
Posted on 18 Nov 2021 16:41:58 by 41

Hello!

I have a Sharepoint List with a pdf attachment on each item. This list is also connected to a Powerapp where users can select each item from a gallery that will take them to a new screen to view more details. The same pdf attachment is listed at the bottom of this screen. 

 

I've received a request to allow multiple selection and downloading of these files at once. Meaning, someone could select via a checkbox or right-click multiple items and download this pdf attachment at one time. Is this possible through the powerapp or the sharepoint list? Either option is fine, but the goal is to allow the selection and downloading of multiple items at the same time. 

 

Thank you!

  • Craig_Humphrey Profile Picture
    166 on 29 May 2024 at 02:40:22
    Re: Select and Download Multiple Files

    Hey @vkothari ,

     

    this is a constraint of using the Download() function in a web browser.

    The documentation clearly points this out:
    Download function - Power Platform | Microsoft Learn

     

    Running your app inside the PowerApps app, will give you a more traditional download experience, but depending on the location of the item to be downloaded, there may be other issues - like authentication.

     

  • vkothari Profile Picture
    13 on 15 Jan 2024 at 06:09:02
    Re: Select and Download Multiple Files

    Hi @unknown_1234 
    Nope Nothing, just opening in the New Tab that's what I doing as of now.

  • ErikM9 Profile Picture
    123 on 10 Jan 2024 at 14:03:51
    Re: Select and Download Multiple Files

    The following formula that I picked up to downloads the selected file:

    Set(surl,First(Split(ThisItem.'Link to item',"Approved_lib")).Value);
    Download(surl&"_layouts/15/download.aspx?sourceurl="&ThisItem.'Full Path');
    
    Patch(Download_Records,Defaults(Download_Records),{Date:Today(),FileName:ThisItem.'File name with extension',Name:Office365Users.MyProfileV2().displayName})

    I found the tutorial here: https://www.youtube.com/watch?v=JYgQVsSOWO8

    I'm hoping to be able to combine a collection with the download feature.

  • unknown_1234 Profile Picture
    49 on 05 Jan 2024 at 07:31:56
    Re: Select and Download Multiple Files

    Hi @vkothari ,

     

     Have you got any ideas or any replies

  • vkothari Profile Picture
    13 on 27 Oct 2023 at 09:00:21
    Re: Select and Download Multiple Files

    Hi @causer ,

    This thing opens all the attachments in the new Tab but I want attachments to get downloaded instead of opening in the new Tab, how can we do that?

  • causer Profile Picture
    2 on 08 Mar 2023 at 09:53:14
    Re: Select and Download Multiple Files

    Try using this as OnSelect for any button or icon:

    Collect(colAttach,ThisItem.Attachments);

    ForAll(colAttach,Download(ThisRecord.AbsoluteUri));

    Clear(colAttach);

    Works for me to open all attachments in one click.

     

  • Leu0101 Profile Picture
    141 on 13 Jan 2022 at 21:44:08
    Re: Select and Download Multiple Files

    I am currently using this . However, I noticed that when I collect my attachments from the gallery and I hit download button I see that the web page cannot be reached. When I go into viewing the collection the ID column shows what I believe to be incorrect. Where I would usually see %20, I see %2b. The webpage with the error said it was trying to  reach: https://XXXXXXXXXXXXX.sharepoint.com/sites/Operations/Lists/Bid%2bPhases/Attachments/408/4A125C81-1E6E-45F7-B52D-EBAE75D24046.jpg. If I change the link to: https://XXXXXXXXXXXXX.sharepoint.com/sites/Operations/Lists/Bid%20Phases/Attachments/408/4A125C81-1E6E-45F7-B52D-EBAE75D24046.jpg It will work. Do you happen to know if there is a fix for this or a way to substitute it? Thanks.

  • pruferk Profile Picture
    41 on 30 Nov 2021 at 00:32:20
    Re: Select and Download Multiple Files

    Additionally, how do I add a checkbox to the gallery in general? It is not letting me reorder it so that it is under the gallery.

  • pruferk Profile Picture
    41 on 30 Nov 2021 at 00:26:52
    Re: Select and Download Multiple Files

    How can I add a checkbox for all items in the gallery? There's about 50 items right now and i want the checkbox to appear for all of them as well as any items that are added later on. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 22 Nov 2021 at 10:09:04
    Re: Select and Download Multiple Files

    Hi @pruferk,

    Do you want to download multi pdf attachments?

     

    I have a test on my side, please take a try as below.

    1). Add a Checkbox within the Gallery and set the OnCheck as below:

    Collect(colAttach,ThisItem.Attachments)

    Set OnUncheck as below:

    Remove(colAttach,ThisItem.Attachments)

    2). Add a button outside the Gallery and set the OnCheck as below:

    ForAll( 
     RenameColumns( colAttach,"Id","MyLink") , 
     Download("https://domain.sharepoint.com/sites/sitename" & Substitute( 
     MyLink,"%252f", "/"))
    )

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard