Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Strange behavior from SubmitForm()

EDIT: found it.  I SWEAR I looked through all the settings for my form, but there it was, a Navigate() off to the other page.  Good way to learn I suppose!


Good Morning,


I have what I hope is a simple problem: I'm working on an app that (among other things) updates a SQL database of electrical parts for my company.  I have an editable form with a description, a couple dropdowns, and a couple other text boxes, some required some not.  Once this is populated and the user hits the 'submit' button, the data are sent successfully to the database, but the app navigates away to a different page, and I want it to just stay put so multiple entries can be made.


In the Action area for my button, OnSelect has 'SubmitForm(AddMaterial); ResetForm(AddMaterial)'  If I use just the ResetForm() it works fine and stays on the page, but obviously doesn't send any data; I did that just to test.  The problem somehow is associated with the SubmitForm() behavior.  I've tried a couple things like using Back() and Navigate() to force it, neither of which works.  It absolutely wants to navigate away to this other page.


I've tried taking actions in other areas of the app to see if they too navigate away, and they don't, as far as I can tell it's just right here.


Is there some logic in SubmitForm() somewhere that could be doing this?  I've attached a screenshot showing the relevant area, with the button selected so it's formula shows.  Thoughts?


Community Support
Community Support

Hi @baumana ,

Could you please share a bit more about your scenario? Do you want to stay in same page after you submit your form data?

Have you solved your problem?


Please check if you have typed Back() or Navigate(...) formula within the OnSuccess property of the Edit form. If true, please consider remove the Back() or Navigate(...) formula within from the OnSuccess property of the Edit form.


In addition, as an alternative solution, I think Patch function could achieve your needs. Please consider modify the formula within the OnSelect property of the "Submit" button to following:

Patch('Data Source', Defaults('Data Source'), AddMaterial.Updates);
Refresh('Data Source');


Please consider take a try with above solution, check if the issue is solved.


Best regards,

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

Helpful resources

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,634)