cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Showing attachments from a Sharepoint List

This may seem like something simple but I can not get this to work.

I simply want to show the attachment in the gallery.  My data is coming from a Sharepoint list.

I want 

Name, Title and then the attachment which will be a PDF I don't need to show a "image" of the attachment...there are tons of tutorials on how to do that I just need to show the attachment.  There won't be any "detailed screens.  This is a simple find the person and get the information about the screen.  I am mainly wantiPowerApp.PNGng the search function of PowerApps here.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @jeckard 

 

Because attachments is a collection  (one can upload more than 1 attahments)

 

if you are sure that users wont upload more than 1 attachment per list item

 

then just add a button and use Launch(First(ThisItem.Attachments).AbsoluteUri)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User III
Dual Super User III

It looks like you are trying to display it in a textbox.  The problem is that attachments are a collection.  There may be no attachment, or one, or multiple attachments. I think you are trying to progam it like there would always only be one. If you wanted to show just the first filename in the attachments use this

First(ThisItem.Attachments).DisplayName

otherwise you'll need to add some kind of control that can show a collection of items.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

That worked however I can't click on it and get it to download the attachment. 

Highlighted
Dual Super User III
Dual Super User III

To click on it and download the attachment you'll need to use something other than a Textbox. Probably something like an HTML control, but I'm not sure how you would bind the value to a link in that control. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Dual Super User II
Dual Super User II

Hi @jeckard 

 

Add a gallery within this gallery and associated its Items property with ThisItem.Attachments

 

The within gallery use ThisItem.displayname and other properties to show data

To download add a button within this sub gallery and use Launch(ThisItem.AbsoluteUri)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted

Reza

I am not understanding what you mean Add a gallery within this gallery and associated its Items property with ThisItem.Attachments.

 

Why can't I just do Launcht (ThisItem.Attachments.AbsoluteUri) from the button?

Highlighted

Hi @jeckard 

 

Because attachments is a collection  (one can upload more than 1 attahments)

 

if you are sure that users wont upload more than 1 attachment per list item

 

then just add a button and use Launch(First(ThisItem.Attachments).AbsoluteUri)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,638)