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

Delete Attachment for Multiple SP List items

Hello Community,

 

I have been struggling to find an easy way to remove the same attachment from the multiple items within SP List. Scenario: I am using the customised forms that pulls information from for a selected item user clicks. There are groups of items that contains same information and only 3 columns are varies. Whenever user upload an attachment for a selected item it gets patched into the rest of the items. This is for consistency, as I cant be sure the user is going to click each time on the same item within a group of items. However, for some reason bulk patching is not working for OnRemoveFile, it is deleting an attachment from a selected item record but keeps it for the rest of the items. Not sure why behaviour is different from OnAddFile Patch. Submit form is not really an option as I still need to delete it from other items. I created a flow as well but it might fails if user delete attachments too quickly. Wondering if someone has a similar experience. Thank you

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @TWilson22 ,

 

In the Canvas app, adding or removing attachments needs to be done through the Form control. So, if you already have a flow , it is recommended that you continue to use this flow, and I suggest that you add a delay action to increase the execution interval to avoid the error you mentioned.

 

Best Regards,

Bof

TWilson22
Frequent Visitor

Thanks, the problem is that I am passing the Last Attachment name to the flow Last(AttachmentControl.Attachments).Name. Whereas the actual deleted attachment could be the 3rd attachment for example. Is there an option to pass last deleted attachment DisplayName to the flow?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,202)