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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,853)