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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to delete just a s...
Power Apps
Answered

How to delete just a single Attachment in a SP List

(0) ShareShare
ReportReport
Posted on by 31

My app currently deletes all attachments from a SharePoint list row. I need to be able to just delete the selected attachment. The code I'm using currently is:

 

Remove([@AssessmentList], GalleryAttachmentList.Selected)

 

which deletes all the attachments

 

Any help will be appreciated.

Categories:
I have the same question (0)
  • vDaddy78 Profile Picture
    31 on at

    Actually, the code provided deletes the entire List entry not just the attachments.

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @vDaddy78 ,

     

    Could you please share more details about your scenario? What's the Items property of the Gallery you mentioned?

     

    I made a demo for your reference:

    vjefferni_0-1658371680419.png

     

    Flow is quite simple:

    vjefferni_1-1658371829201.png

    Both input parameters are "Ask in PowerApps" from dynamic content, if you cannot find it, click "See more".

     

    Button OnSelect:

     

    ForAll(ListBox1.SelectedItems, 'PowerApp->Deleteattachment'.Run(ThisItem.ID,Id));Refresh(AssessmentList)

     

     

    Best regards,

  • Verified answer
    vDaddy78 Profile Picture
    31 on at

    I made a change in the app to where they are only able to load a single attachment per row in the list. They have to remove the current attachment before being able to load a new one. I remove the current attachment using the Patch Form.Update

     

    Thank you for the help though.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard