web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delete Attachment from...
Power Apps
Answered

Delete Attachment from Sub-Gallery from Sharepoint List

(0) ShareShare
ReportReport
Posted on by 611

I'm hoping to enable the end user to be able to delete a specific attachment from within a sharepoint list by way of my power app. 

 

I have two galleries:

PriceProposalGallery: Item: NewProj (sharepoint list)

AttachmentsGallery (sub gallery to PriceProposalGallery): Item: ThisItem.Attachments

 

I'm trying to use add a trash can icon that's OnSelect would delete/ remove an attachment, this is where I am but nothing seems to be working:

Remove(NewProj, ThisItem.Id)

Error: ThisItem = This formula uses scope, which is not presently supported for evaluation

 

 

Categories:
I have the same question (0)
  • Verified answer
    cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Well ya don't want to remove from NewPro it'll remove the list item itself :P. 

     

    I don't think it's possible to remove items from SharePoint Attachments in PowerApps directly, you have to use the Attachments control and it only works in forms with a submit function. 

     

    Alternative solutions might be look to call a flow to remove the attachment onselect the refresh the SP Datasource. But directly out of box PowerApp can't do that to my knowledge. 

     

    I always use a document library to store my attachments in Apps instead of SharePoint lists since they are limited to size etc. Just have a doc library, with a added metadata field storing the ID of the list item, then save everything to that library with the Item ID and you can easily connect a gallery directly to that and make edits etc. much easier. 

  • v-chenzhi Profile Picture
    Microsoft Employee on at

    Hi @TesDA ,

     

    As mentioned by @cwebb365 , I afraid that there is no way to achieve your needs in PowerApps currently.

    As an alternative solution, you could consider achieve your needs using PowerApps together with Power Automate flow. I have a test on my side, please try the following workaround:

    Add a trash can icon in PriceProposalGallery and set the OnSelect property of Icon to:

    Deleteattachment.Run(ThisItem.ID,First(ThisItem.Attachments).Id);Refresh(List1203)

    vchenzhi_0-1638515722638.png

     

    vchenzhi_1-1638515870989.png

    If this post helps, please mark @cwebb365 's post as a solution.

     

     

    Best Regards,

    Zhi Chen

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard