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

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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