cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Erikjn
Frequent Visitor

Fetch Attachments from Sharepoint List

Is there a way to display and download attachemtns from a sharepoint list in a gallery based on the sharepoint ID number?

4 REPLIES 4
v-siky-msft
Community Support
Community Support

Hi @Erikjn ,

It can be known that the type of Attachments is table, because multiple attachments can be stored in it. That means you cannot bind the attachments to a single image control, but certainly you can show the attachment(s) of a selected record, in a new gallery. Then use Download function to download attachemtns

Follow my example below:

1- Create one gallery for your SharePoint list, and create another gallery for your SharePointt attachments. align these two galleries side by side, or however you like to design your form.

2- Change the Item property of your second gallery to firstGalery.Selected.Attachments

3- Set the OnSelect property of second gallery as Download(ThisItem.AbsoluteUri)

Annotation 2019-10-24 155558.png

Best regards,

Sik

If this post helps, then please click on “Accept as Solution”  to help the other members find it more quickly.

Hi Sik,

 

So I implemented what you had shown and it works great, but I would like to be able to on selected the "Down Arrow" to the next Row Item for the Attachment to also update per row number.  Is that possible?

 

So far I can not get the attachment to change?

 

Thanks @Erikjn 

 

Annotation 2019-10-28 114222.pngAnnotation 2019-10-28 114133.png

Hi @Erikjn ,

 

What does the " for the Attachment to also update per row number" mean?

If you want to change the attachment, you can use EDIT Form to attach/remove attachments, and use SubmitForm function to save the change.

1. Add a EditForm , set Field to Attachments

2. Set Items property of EditForm as below

 

Gallery1.Selected

 

3. Add a 'Submit' button, set OnSelect property as below

 

SubmitForm(Form1)

 

Annotation 2019-10-29 164902.png

Hope this helps.

Best regards,

Sik

Hi Erikjn,

 

If I understand correctly, you want to display the attachments of selected item/row when you click on up/down arrow.

 

Since you have already implemented the logic to show attachments for selected item/row on click of "right row", you need to add same code for "On Select" property of your up/down arrow along with other code you have.

 

Hope it helps.

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 Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (70,089)