Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 72

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:
  • zbeg Profile Picture
    295 Super User 2025 Season 1 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

    IT happens to me too did you solved it ?

  • ChiranJay Profile Picture
    72 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

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

  • ChiranJay Profile Picture
    72 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

    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

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

    @chiranjay 

    What is the issue you are having at this point?

  • ChiranJay Profile Picture
    72 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

    @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 

  • ChiranJay Profile Picture
    72 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

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

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: PowerApps Attachment Control Doesn't Reset After Form Submission and Keeps an old attachment

    @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. 

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard