web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard