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 / 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

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard