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 Attachme...
Power Apps
Answered

How to delete Attachments only in Gallery and also delete attachment in sharepoint list

(0) ShareShare
ReportReport
Posted on by 61

Hello Everyone I am new to Powerapps Can anyone help me in this situation  I have a gallery page in powerapps it have attachments stored into Sharepoint list . My Sharepoint list name is Reportees Rating . If I clicked delete icon it should delete attachments column only in both gallery and sharepoint list. Can anyone help me in this formula

 

I have used this formula but it doesnot working

Remove('Reportees Rating', Gallery8.Selected)

 

This is sample page gallery view

 

delete icon doubt.png

 

 

Can anyone please help me to resolve the issue

 

Thanks and Regards

Argus

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @Argus_1234 ,

    That will remove the entire record - are you trying to do this or just the attachments on the record ?

  • Argus_1234 Profile Picture
    61 on at

    Hi @WarrenBelz  I want to remove only Attachments in both sharepoint list and gallery not whole Record 

     

    Please help me sir

  • Verified answer
    WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Argus_1234 ,

    Then it gets a lot more complicated - you need to use Power Automate - Flow looks like this. You can put whatever you want in the bottom box - it is just to make Power Apps wait until the Flow is finished so the List can be refreshed.

    WarrenBelz_0-1715676196788.png

    This Flow example is named Delete Attachments and the Power Apps code is (using my test list)

    ForAll(
     ThisItem.Attachments As _Files,
     DeletedAttachments.Run(
     ThisItem.ID,
     _Files.Id
     )
    );
    Refresh(TestFields)
    

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Argus_1234 Profile Picture
    61 on at

    Hi @WarrenBelz  the flow runs in sharepoint the attachment deleted but in powerapps the other fields like employee, Designation also deleted but i want to show the fields in gallery can you help me 

     

    this is gallery view after deleted

     

    empty gallery doubt1.png

     

     

  • Verified answer
    WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Argus_1234 ,

    I can assure you it only deletes the attachments (have you checked SharePoint ?). You also may be filtering the gallery for items with attachments.

  • Argus_1234 Profile Picture
    61 on at

    Hi @WarrenBelz   Thank you so much sorry I again checked now its working, You saved me from big trouble. Thanks a lot

  • Argus_1234 Profile Picture
    61 on at

    Hi @WarrenBelz  the deleteattachment powerapps formula today doesnot working can you help me previously it working very well on that time i give the formula in onselect property of trash icon today due to change in requirement i given the onselect proiperty of yes button in delete popup.  But its show error

     

    This is the formula i used onselect property of button

     

    Argus_1234_0-1716267092244.png

     

    Can you help me to solve the issue.

     

    Thanks and Regards

    Argus

     

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Argus_1234 ,

    That button / icon needs to be inside the Form or Gallery containing the record

  • Argus_1234 Profile Picture
    61 on at

    Hi @WarrenBelz  Actually the button is outside the gallery its present on the screen is there anyway to use this formula without getting error  

     

    Argus_1234_1-1716533807861.png

     

    Here the button located outside the gallery inside the screen 

     

    Argus_1234_2-1716533881049.png

     

    please help me

     

    Thank you and Regards

    Argus

     

     

     

     

  • Verified answer
    WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Argus_1234 ,

    Instead of ThisItem, use GalleryName.Selected (with actual gallery name)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard