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 / OnRemoveFile on Attach...
Power Apps
Unanswered

OnRemoveFile on Attachments Datacard

(0) ShareShare
ReportReport
Posted on by 280

Good day experts!

Asking for your help please if how can I set the OnRemove function to add a new attachment if the user has to replace the existing uploaded file. Note that my attachment is set to max:1. Thank you in advance!

scorpio24_0-1716430029333.png

if I click the 'x' button:

scorpio24_2-1716430242644.png

 

 

Categories:
I have the same question (0)
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @scorpio24 ,

    From my test I think this is only possible for new form, please check my below test:

     

    I created collection to collect all the attachments attached in attachment control and the items property of this control is this collection.

    HenWang_0-1681352396223.png

     

    This will help to update the collection according to end user's action, add or move or undoremove. And we are sharing the same remove way in the trash icon, which is working fine to remove the same item inside the attachment control at the same time.

     

    However, this logic won't work for the edit item, as the edit item has its own Items value already, which will cause conflict with this specific logic and the same formula will not work. Please feel free to have a try.

     

    my formula: ClearCollect(attachmentts,DataCardValue7.Attachments)

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