cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Stop incomplete submission navigating

Hi all,

 

I have a form with a submit button the sends the entires to a Sharepoint list. I added a second function to the button to navigate to a second screen that thanks them for their submission and outlines what they should expect.

 

The problem is it navigates to the page whenthe submission fails (eg due to incomplete fields).The error message still pops up but I know people will miss it and assume the form submitted correctly.

 

Is there arnything I can add to prevent navigation when the submission fails? 

 

This is what I have now:

SubmitForm(Form1); Navigate(Screen1, Fade)

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Level 10

Re: Stop incomplete submission navigating

There's a few methods I'd recommend to solve this:

  • Configure the Required property of datacards so that the form cannot be submitted without those
  • Change the Disabled property of the Button so that it's disabled if the required fields are not validated or filled the way you want
  • Place a condition around the SubmitForm() function so that it only triggers when your conditions are met

 

It's a lot to describe, but I think you can search the forum for ways to do those things.

Microsoft Employee
@8bitclassroom

View solution in original post

6 REPLIES 6
mr-dang
Level 10

Re: Stop incomplete submission navigating

Hi, 

Each form has OnSuccess and OnFailure properties. Instead of making your button Submit the Form and then Navigate, you can make the form Navigate upon being succesful in submitting the form. 

 

So you can set Form.OnSuccess to:

Navigate(Screen1, Fade)

And keep the button only:

SubmitForm(Form1)
Microsoft Employee
@8bitclassroom
Anonymous
Not applicable

Re: Stop incomplete submission navigating

That solved my problem but created a new one unfortunately. When I do the above the form will always submit even when required fields have not been completed.

 

I also tried making the form onsuccess 

SubmitForm(Form1); Navigate(Screen1, Fade)

 
and that stopped the incomlete submissions and the navigation on successful attempt but unfortunately always gives an error message on successful submission
 
Is there anything else I can try?
mr-dang
Level 10

Re: Stop incomplete submission navigating

There's a few methods I'd recommend to solve this:

  • Configure the Required property of datacards so that the form cannot be submitted without those
  • Change the Disabled property of the Button so that it's disabled if the required fields are not validated or filled the way you want
  • Place a condition around the SubmitForm() function so that it only triggers when your conditions are met

 

It's a lot to describe, but I think you can search the forum for ways to do those things.

Microsoft Employee
@8bitclassroom

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Stop incomplete submission navigating

I was going to come back to this and fix the issue but when I put the previous solution in place it worked perfecty.

 

Why it stopped submitting incorrectly now I'm not sure but if it's working that's good enough for me.

dhawalseth
Level: Powered On

Re: Stop incomplete submission navigating

Great solution. I spent 2 hrs figuring out various other solutions.

Dawidvh
Level 10

Re: Stop incomplete submission navigating

Hi @Anonymous 

You can also use the Valid card and form properties to do validation before trying to execute the submitform which then triggers the infamous "An entry is required or has an invalid value. Please correct and try again." error.

Please see below video that shows how you can use this.

 

https://youtu.be/7O8HCz37Q0A

 

Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions. AND we get points for it 😉

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 337 members 6,732 guests
Please welcome our newest community members: