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 files in the ...
Power Apps
Unanswered

Download files in the Power Apps gallery connected to the document library.

(0) ShareShare
ReportReport
Posted on by 14

Hi community,

I'm having trouble downloading files from the Power Apps gallery connected to the SharePoint document library, and here are the details:

 

1. The document library 'FICHAS TECNICAS' has been connected to Power Apps.

2. In the Power Apps canvas, a variable 'VarFolderPathCurrent' has been created in OnStart, where the root path of the library is set. Here's the syntax:

 

Set(VarFolderPathCurrent, "FICHAS TECNICAS/")

 

3. A gallery has been created on the screen to display information from the library (Image 01).

4. There's a syntax for the document icons to open the document in a new tab (Image 02), and here's the syntax:

 

If(
ThisItem.EsCarpeta;
Set(VarFolderPathCurrent, ThisItem.'Ruta de acceso completa' & "/");
Launch(ThisItem.'Vinculo al elemento', Blank(), LaunchTarget.New)
)

 

5. What the user is requesting is an option to automatically download the file when clicked, rather than opening it in a new tab. What syntax should be used to automatically download the file?

 

Image 01: Screen in Power Apps

Walter1989_0-1700514575014.png

 

Image 02: open the document in a new tab

 

Walter1989_1-1700514724001.png

 

I look forward to hearing from you

Have a great day!!!

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @Walter1989 ,

     

    Please try this

    Download("https://<site URL>/_layouts/download.aspx?SourceUrl=/sites/sitename/libraryname/filename.pdf")

     

    Best Regards,

    Wearsky

  • Walter1989 Profile Picture
    14 on at

    Hi @v-xiaochen-msft ,

     

    I have just completed the request in the post:

     

    Syntax: Download("https://greengroupcompe.sharepoint.com/_layouts/download.aspx?SourceUrl=/sites/Logistica/FICHAS%20TECNICAS/API002%20-%20Lampara%20UV%20O3%2Epdf") - Image 01

     

    When I click on it, it displays an error message (Image 02).

     

    I am sending the link to the space (Image 03) and the link to the PDF (Image 04).

     

    Image 01: Sintaxis

     

    Walter1989_0-1700579479679.png

     

    Image 02: Error message

     

    Walter1989_1-1700580668586.png

     

    Image 03: Site

     

    Walter1989_2-1700580729758.png

     

     

    Image 04: Document

     

    Walter1989_3-1700580773223.png

     

     

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