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 / Attachment Control Rep...
Power Apps
Answered

Attachment Control Replace Existing Attachment

(0) ShareShare
ReportReport
Posted on by 33

This was raised here but not satisfactorily answered: https://powerusers.microsoft.com/t5/Building-Power-Apps/Attachment-Control-in-Edit-Form-with-limit-to-1-file/m-p/191712

 

When using an attachments control, editing an existing record with attachments, and the max number of attachments are present, it is not possible to remove a file and attach a new one in its place in one submission.

 

One or more attachments must be removed, the form submitted, and then the edit form reloaded. This will show the attachments control with with room to upload more files. Why can this not be accomplished in one submission?

 

As an example, I have a form for uploading a screenshot to a record. The Max Attachments is 1. If the user wishes to swap the image file, they must delete, submit, and upload and submit again. I could increase Max Attachments to 2 but unsuspecting users will end up uploading 2 files and then getting confused when they want to swap them out for a third file.

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @A-Team-2020 ,

    I cannot test this presently, but try this concept

    At Screen OnVisible

    UpdateContext({vAtt:1})

    On MaxAttachments

    vAtt

    OnRemoveFile

    UpdateContext({vAtt:2})

    OnAddFile and OnUndoRemoveFile

    UpdateContext({vAtt:1})

     

    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.

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @A-Team-2020 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    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.

  • A-Team-2020 Profile Picture
    33 on at

    Hi @WarrenBelz

     

    This is a workable solution thanks!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard