cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mprice
Helper II
Helper II

Showing link to file saved in sharepoint document library

Hello,

 

So I have a sharepoint document gallery called keyimage. It has pdf files saved. My goal is to have links or a button that when the user clicks, it either displays or downloads the pdf. 

 

I have a page, showing information from a sharepoint list, called KEYS. It shows each data point in a gallery, on selection of one of the data points, it displays the information on the right side of the screen. The title of each of these points of the gallery directly corresponds with the name of the pdf in the sharepoint gallery. (So title of KEYS + ".pdf" = keyimage name)

 

Is there anyway to have this work out?

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @mprice ,

 

So you have a library called "keyimage" associated with a SP list "Keys", right?

 

When selecting an item in the Gallery, you could get the file link from the library if you have added it into Power Apps as a data source:

Set(varFile,LookUp('your liabrary', Name = ThisItem.KEY).'Link to item')

 

Then you could use Download or Launch functions to download the pdf file:

Download(varFile)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-jefferni
Community Support
Community Support

Hi @mprice ,

 

So you have a library called "keyimage" associated with a SP list "Keys", right?

 

When selecting an item in the Gallery, you could get the file link from the library if you have added it into Power Apps as a data source:

Set(varFile,LookUp('your liabrary', Name = ThisItem.KEY).'Link to item')

 

Then you could use Download or Launch functions to download the pdf file:

Download(varFile)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Hey @v-jefferni 

 

Thank your for the help. It works! However, I am having one problem. I have a delegation warning in the Set function with the " Name =" part of the lookup function.

 

Do you know how to avoid this.

v-jefferni
Community Support
Community Support

Hi @mprice ,

 

If using Name column of SharePoint, basically there is always a delegation issue. The best approach in SharePoint is to use ID column of lists and libraries it's the primary key column.

 

In your case, you may check the Title column of the library that if it has same values as the Name column, if no then you will need to add a LookUp column in the Keys list which looks up tp the library and display the link column from the library.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,449)