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 / Launch a file from lib...
Power Apps
Answered

Launch a file from library within powerapps gallery search results

(0) ShareShare
ReportReport
Posted on by 5

Hi, I have a Sharepoint site with a list, library, and a collection  the collection was created from the files in the library.

 

Mylist (three column names: Name, Number, FileName)  , Mylibrary (a group of PDF files named, FileName.pdf (matches the File name field in the list and collection) , Mycollection

 

I created a screen with a searchable gallery (either the Name or Number column) in MyList.  works well.

 

I want to place an icon on the right side of the gallery box that will launch the PDF file with the same name as my list from either MyLibrary or MyCollection.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    Hi @tpii ,

     

    You did not say how exactly MyCollection was collected, so I will give you two possibilities.

    If the collection contains the metadata for the library, then one of Launch(‘link to item’) or Launch(‘link’) should work (sorry I am not in front of my PC). You will see the parameters come up when you type Launch.

    Otherwise you can launch it with the absolute URL (I assume it is in SharePoint). Launch(<SharePoint folder URL> & (file name)

     

    Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

     

     

     

  • tpii Profile Picture
    5 on at

    Warren, thanks for the note.  I did find a solution in my code based on your note.  I was not enclosing the hyperlink to launch in double quotes.  frustrating to know what the app wants where, quotes, brackets, curvy brackets, square brackets...  It almost seems each command has its own quirks.

     

    thanks again, Tom

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    Hi Tom @tpii ,

    Yes - Launch URL are strings, and any text outside control references needs to be in quotes.

     

    Can you please accept as a solution to close this and also allow others with similar queries to easily find it.

     

  • MaintenanceGuy Profile Picture
    30 on at

    what if i want to grab the file name from table located in the power app?

    launch (<url to sharepoint>& (datacardvalue1))

     

    i know i am missing something here in the data grab from there just not sure? any help

  • Xardas87 Profile Picture
    8 on at

    'Link to item' gives a weblink that is a mixed bag for Launch function.
    Example: SharePoint URL/Nameofdoc.docx?d=w"GUID"&csf=1&web=1&e=etc...

    The way around this is to create a direct link from the value returned by 'Link to item"

    Launch(Left('DataCardURLvalue',Find("?d=",'DataCardURLvalue')-1))

    PowerApps will Launch( based on the extension the string ends with ".docx" or ".PDF" example.
    (Left return the address value Left of the Find( "?d="  This will be the absolute URL mentioned by @WarrenBelz 

    Data source
    Find(
    "?d=" this is the first part of the unwanted web string right of our extension ".docx" or ".PDF"

    Data source

    -1) Remove the question mark from the end of direct link .docx?

    Launch(Left('DataCardURLvalue',Find("?d=",'DataCardURLvalue')-1))

  • Xardas87 Profile Picture
    8 on at

    If you are using 'Link to item' in a gallery or in  a Form data card.  Its not going to give you a direct link.  If you view it as a URL it will open in Web View.  Library settings for Default application do not apply to web view links.   So you need a direct link if you want to launch the document.

    Launch(Left('DataCardURLvalue',Find("?d=",'DataCardURLvalue')-1))

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 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard