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!
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.
Hi @unknown_1234
Nope Nothing, just opening in the New Tab that's what I doing as of now.
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.
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?
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.
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.
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.
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.
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", "/"))
)
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional