cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
King
Advocate III
Advocate III

remove individual attachments from an item

In powerapps I have a gallery with the attachments of the item, how do I remove them individually?

 

gallery filter:
LookUp(
'List of administrative procedures';
ID = Editable element. ID
) .Attached files;

 

delete button that doesn't work

Remove (
LookUp (
'List of Administrative Procedures';
ID = ElementEditable.ID
) .Attachments;
ThisItem
)

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @King :

Could you tell me what your datasource is?Is it SharePoint?

Do you want to delete the attachment selected by the gallery?

In theory, if you need to add or delete attachments, you should use the edit form control and submitform function.(Because the attachments control can only be used in the form).

I suggest you try these steps:

1\add an edit form(Form2)

DataSource

 

'List of administrative procedures'

 

Item

 

LookUp(
'List of administrative procedures';
ID = Editable element. ID
)

 

2\add a button and set it's OnSelect property to:

 

SubmitForm(Form2)

 

26.gif

I think this link will help you a lot:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-attachments#limitation...

Best Regards,

Bof

View solution in original post

2 REPLIES 2
JayMagness
Solution Specialist
Solution Specialist

HI,

 

It would be easier to use SharePoint and use the attachments field to do this all the heavy lifting is done by SharePoint and can add or remove as you want.

v-bofeng-msft
Community Support
Community Support

Hi @King :

Could you tell me what your datasource is?Is it SharePoint?

Do you want to delete the attachment selected by the gallery?

In theory, if you need to add or delete attachments, you should use the edit form control and submitform function.(Because the attachments control can only be used in the form).

I suggest you try these steps:

1\add an edit form(Form2)

DataSource

 

'List of administrative procedures'

 

Item

 

LookUp(
'List of administrative procedures';
ID = Editable element. ID
)

 

2\add a button and set it's OnSelect property to:

 

SubmitForm(Form2)

 

26.gif

I think this link will help you a lot:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-attachments#limitation...

Best Regards,

Bof

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,612)