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 / PowerApps Attachment C...
Power Apps
Answered

PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

(0) ShareShare
ReportReport
Posted on by 79

Hi Team,


I am experiencing an issue with PowerApps - Attachment Control.

 

I have created this app using a SharePoint List.

 

When I submitted an instance of the PowerApps Form I built as an item, the attachment control keeps and an old attachment as an attachment. This old attachment is not with us anymore but the form manages to show it after the submission.


To submit I'm using a button named 'Submit'

My current property values are as the below.

Attachments_DataCard1
1. Reset property - True.
2. Items property - Parent.Default
3. Default - ThisItem.Attachments
4. DataField - "{Attachments}"
5. DisplayMode - Parent.DisplayMode

AttachmentsDataCardValue
1. Reset - True
2. Items - Parent.Default
3. Default - Empty

 

Form Properties
1. Default mode - New


Submit Button
OnSelect - SubmitForm(SharePointForm1)&&NewForm(SharePointForm1)

I tried even OnSelect - SubmitForm(SharePointForm1)&&ResetForm(SharePointForm1)&&NewForm(SharePointForm1)


I can't understand the issue.

Please can someone help me with this?

Kind regards,
Chiranthaka

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @chiranjay 

    First, your OnSelect of the submit button should ONLY be SubmitForm.  SubmitForm occurs in the background, so once the function is initiated, it continues to then evaluate the rest of your formula.  Issuing a NewForm or Reset or anything else immediately after the SubmitForm can impact the form itself before the SubmitForm has completed.

    Also, by doing that kind of thing, you are assuming that the record will submit successfully.  It may not!!  And from a user perspective, if it fails and they need to correct something...you just wiped out everything and they have to do it all over again.

    You should be utilizing the OnSuccess and OnFailure actions of your form.  In this particular case, your OnSuccess action should contain the function:  ResetForm(SharePointForm1)

    Since the default mode of the form is New mode, it will reset the form back to that.

     

    Next, separate your chained function with a semicolon. Using a Boolean AND (&&) is not useful as the formula will try to evaluate all of the results of the functions you have...and the functions you have do NOT return any values.

    If your region is not US, you might need to use two semicolons between.  This is dependent on your regional language settings.

     

    Next, your Reset properties should not be set to true.  Controls reset WHEN the Reset property goes to true.  If it stays at true, it will never reset again.  By default they should be set to false.

    So change those first!

     

    I hope this is helpful for you.

    You are showing an Items property for your attachments datacard.  The Datacard does not have an attachment property, so I am not sure if this was just a mistake or if you are seeing something inaccurate. 

     

  • ChiranJay Profile Picture
    79 on at

    Thanks, @RandyHayes for helping out with this issue. It's a solid one.

  • ChiranJay Profile Picture
    79 on at

    @RandyHayes 

     

    I was wondering, are there any other solutions to resolve this issue? Like using a formula or similar?

     

    The solution you gave previously is working by the way.

     

    Thanks

    Chiranthaka 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @chiranjay 

    What is the issue you are having at this point?

  • ChiranJay Profile Picture
    79 on at

    Hi @RandyHayes ,

    Sometimes the attachment control is not resetting. This happened in a different form not the one I had this issue at first. 

    As per your instructions I changed the properties but it didn't reset properly.

     

    Thanks,
    Chiranthaka

  • ChiranJay Profile Picture
    79 on at

    @RandyHayes This option is not working anymore 😪.
    Can you suggest a different solution for this issue, please?

  • arcado Profile Picture
    352 Moderator on at

    IT happens to me too did you solved it ?

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

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 86 Super User 2026 Season 1

Last 30 days Overall leaderboard