cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iowakrz
Regular Visitor

ResetForm versus NewForm

Just some information to users to be careful with ResetForm.  I was using SubmitForm and ResetForm on an action button to insert data into a sql table.  The button was working every other time and I couldnt determine why.  Buried in the documentation it says ResetForm resets the form on your screen and sets the FormMode to Edit.  You want it to be New to insert a new record.  Use SubmitForm and then NewForm.

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi iowakrz,

 

As you mentioned, the ResetForm function resets the contents of a form to their initial values, before the user made any changes.

 

SubmitForm function in the OnSelect property of a Button control save any changes in a Form control to the data source.

 

The NewForm function changes the Form control's mode to FormMode.New. In this mode, the contents of the Form control's Item property are ignored, and the default values of the Form's DataSource property populate the form.

 

More details at here:
https://powerapps.microsoft.com/en-us/tutorials/function-form/



Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (20,870)