cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tapesh
Post Prodigy
Post Prodigy

Error message is show but still form is submitted, why?

HI all, 

 

I m trying to fix this issue, id not know how should I do. i have a form which has some required fields, but when I feel the details even if its blank, the form is still submitted , I don't whats wrong, but as soon as user clicks on submit form button, for a blink of an eye he can see the red marks which says required files but still the data has been updated to sharepoint, 

 

 

why? m I doing some thing wrong?

 

please see the code. and screen shot Untitled.png

 

Code: 

Onselect of SaveIcon: 

 

If ( TotalEdit_Total_Input.Text = TotalEdit_TotalDifference_Dropdown.SelectedText.Value, SubmitForm(Edit_Total_Form) & Navigate(SuccessScreen), Notify("The total value is not equal to total float, Please enter correct values")); 

 

ONSuccess of from: 

 

ResetForm(Edit_Total_Form)

 

ONFailure: False

 

ONReset: false

 

 

Any suggestions: ?

1 ACCEPTED SOLUTION

Accepted Solutions

Can you change the OnSelect of your Save button to this: 

If ( TotalEdit_Total_Input.Text = TotalEdit_TotalDifference_Dropdown.SelectedText.Value, SubmitForm(Edit_Total_Form), Notify("The total value is not equal to total float, Please enter correct values")); 

Then change the OnSuccess of the form to:

Navigate(SuccessScreen); ResetForm(Edit_Total_Form)

 

Let me know if this helps. I believe your users are using the error message only for a few seconds because you are forcing the navigation even if the SubmitForm was not successful. By moving the navigation to OnSuccess of the form, it will navigate only if the form was submitted successfully. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

6 REPLIES 6
eka24
Super User
Super User

Can you try wrapping the formula with Value:

Value(TotalEdit_Total_Input.Text)= TotalEdit_TotalDifference_Dropdown.SelectedText.Value

Or

Insert a hidden textbox2 to pick the dropdown and use:
Value(TotalEdit_Total_Input.Text)= Value(textbox2)

 

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.

 

 

Hi, the solution you gave is perfect the but I have issue with star mark fields, which I guess are still not showing error message when the filed is empty. 

Since the field is a required field *, it is supposed to give error message if not filled.

If you dont want it to be a Required field, then set the required to false. However if the required is related to the datasource, then removed the required from those columns.

 

Another approach is to disable the Save button once those fields are not field:

That is on DisplayMode of the Save Button:

If(!IsBlank(Textbox1.Text)&&

!IsBlank(TextBox2.Text)&&

!IsBlank(TextBox3.Text),Edit,Disabled))

 

Also you can give your own message / notification:

If(!IsBlank(Textbox1.Text)&&

!IsBlank(TextBox2.Text)&&

!IsBlank(TextBox3.Text),Notify("Please fill All fields with Stars*"),Submit(YourForm))

 

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

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.

 

Can you change the OnSelect of your Save button to this: 

If ( TotalEdit_Total_Input.Text = TotalEdit_TotalDifference_Dropdown.SelectedText.Value, SubmitForm(Edit_Total_Form), Notify("The total value is not equal to total float, Please enter correct values")); 

Then change the OnSuccess of the form to:

Navigate(SuccessScreen); ResetForm(Edit_Total_Form)

 

Let me know if this helps. I believe your users are using the error message only for a few seconds because you are forcing the navigation even if the SubmitForm was not successful. By moving the navigation to OnSuccess of the form, it will navigate only if the form was submitted successfully. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Thanks alot 😄

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT 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 (3,804)