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

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,112)