web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Submit(save to data so...
Power Apps
Answered

Submit(save to data source) and then Reset a form

(0) ShareShare
ReportReport
Posted on by

Hello all, 

This seems like simple fix but it is not coming to me. here is the question...

I am trying to create an invoice app, I have it down till entering multiple items . I have an "Add Item" button that I would like to submit the one item they just entered and have it reset the form to add the new item ( i would like it to reset some of the data cards and not others if possible ie company name, ID #, and dates stay all others reset to blank).

 

I have tried

Submit(Editform1); Reset(editform1) : The Function expects a resettable control as its input

I have tried a patch: But it keeps giving me an error after submitting or telling me that my controls are wrong

I have also tried : SubmitForm(Editform1); Reset(each card I want to reset) :The Function can only be used with a resettable control. Controls with in a form or Gallery can only be reset from with in the same form.

 

Im okay if I cant have certain cards reset but I would like to get able to submit the form and then reset in one button so they can enter another item... Im thinking its not reset that i need to use but something else... this will most likely be a forehead slap it is figured out 

Please help ! 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    As a rule I never put anything other than SubmitForm() in a button that actually submits the form.  Any other commands should be added to the OnSuccess property of the form.  That way, they will not execute unless the form is successfully submitted. 

  • eka24 Profile Picture
    20,923 on at

    Try OnSelect of the save button:

    Submit(Editform1); Newform(Editform1)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    Put this code in the OnSelect of your button

    SubmitForm(Form1);

     

    Put this code in the OnSuccess property of the Form

    NewForm(Form1)

     

    This combines the idea of @eka24 with the good point by @Drrickryp that the form should only reset if successful.  Give them both credit instead of me.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard