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 / ResetForm not called w...
Power Apps
Unanswered

ResetForm not called when clicking outside the custom SharePoint list form

(0) ShareShare
ReportReport
Posted on by 1,594

Let's say you have a custom list form and you do the following:

  • you select an item from the list where a field has a value of "ABCD"
  • you click "Modify" > the form is shown
  • you set a field to "AAAA"
  • you click on the cross in the upper-right corner of the form > the forms is closed
  • you click on "Modify" again > the form is shown
  • the field is still "AAAA" ?!?!
  • you set the field to "BBBB"
  • you click outside the form > the form is closed
  • you click on "Modify" again > the form is shown
  • the field is still "BBBB"
  • you click on "Cancel" (the button) > the form is closed
  • you click on "Modify" again
  • the field has the value "ABCD"

 

Why isn't the form reset when we click outside the form or on the upper-right cross ? Why are there different behaviors here ? Very painful...

 

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @R3dKap,

     

    I have made a test and the issue is confirmed on my side.

     

    There are some things to keep in mind when you customize forms:



     

    • You can't control the hiding of a form when a user clicks or taps Cancel in SharePoint, so make sure you reset your forms in the OnCancelformula of the SharePointIntegration control.

     

    • The properties for the SharePointIntegration control may not be available in OnStart or OnVisible, and those events execute only once while the list is loaded. You can use OnNewOnView, or OnEdit formulas to run logic before the form is shown to the user every time.

     

    In other words, the custom SP list form could only be loaded once when you added a new item or edited an existing item. When you click the outside the form or on the upper-right cross, the form would be hidden rather than closed, so your form would not be reset.

     

    But when you click the "Cancel" button within the form, it would trigger the OnCancel property of the SharePointIntegration control, and then hide the form (rather than close the form). The OnCancel property of the SharePointIntegration control set to following formula:

    ResetForm(SharePointForm1)

    So it would reset your form when you click the "Cancel" button.

     

    More details about the things to keep in mind when you customize forms, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/sharepoint-form-integration

     

    In addition, if you want to reset the form when you click the outside the form or on the upper-right cross, please take a try with the following workaround as an alternative solution:

     

    Set the OnEdit property of the SharePointIntegration control to following formula:

    ResetForm(SharePointForm1);EditForm(SharePointForm1)

    4.JPG

     

     

    Best regards,

    Kris 

  • Alisona Profile Picture
    13 on at

    Hello,

     

    I have tested this solution, and it does not work

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard