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 wanting the search function of PowerApps here.
Solved! Go to Solution.
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
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.
That worked however I can't click on it and get it to download the attachment.
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.
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
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?
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
Small workaround, on the Thumbnail card, add a Label example URLattachment.Text = First(ThisItem.Attachments).AbsoluteUri, then add a button OnSelect = Launch(URLattachment) , and that did the trick for me , for some reason I got stuck there too. De nada 😄 saludos desde Regiolandia !
Thanks so much! This worked for me
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
201 | |
71 | |
49 | |
43 | |
30 |
User | Count |
---|---|
253 | |
121 | |
86 | |
84 | |
84 |