cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

validation of forms in powerapps

I am trying to validate form onsuccess but its not working for patch updates it only work on submit forms

Form2,updates is the form where validation is required 

 

Patch(SPlist, SelectedItem, Form_1.Updates, Form2.Updates,Form3.Updates);

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: validation of forms in powerapps

Hi @Ashok2 ,

Currently, within PowerApps app, the Form validation mechanism only work when you use SubmitForm function to submit form data, it would not work for Patch function.

 

In addition, based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

If(
    IsEmpty(
            Errors(
                    SPlist,  // Modify here. Specify your SP List data source here
                    Patch(SPlist, SelectedItem, Form_1.Updates, Form2.Updates, Form3.Updates)
            )
    ),
    ResetForm(Form_1);ResetForm(Form2);ResetForm(Form3);Back(),
    Notify("There is something wrong when you submit form data" & First(Errors(SPlist)).Message, NotificationType.Error)
)

 

Please 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.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: validation of forms in powerapps

Hi @Ashok2 ,

Have a read of this post - it may resolve your issue.

 

 

Please click and 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.

Highlighted
Helper IV
Helper IV

Re: validation of forms in powerapps

Tried below syntax but getting error

 

If(
IsEmpty(
Errors(
Patch(SPlist, SelectedItem, Form_1.Updates, Form2.Updates,Form3.Updates);
)
)
)

Highlighted
Super User III
Super User III

Re: validation of forms in powerapps

Hi @Ashok2 ,

The Errors function needs to be used after the patch - you need to check on the result of the Patch after it has been applied.

 

Please click and 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.

Highlighted
Community Support
Community Support

Re: validation of forms in powerapps

Hi @Ashok2 ,

Currently, within PowerApps app, the Form validation mechanism only work when you use SubmitForm function to submit form data, it would not work for Patch function.

 

In addition, based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

If(
    IsEmpty(
            Errors(
                    SPlist,  // Modify here. Specify your SP List data source here
                    Patch(SPlist, SelectedItem, Form_1.Updates, Form2.Updates, Form3.Updates)
            )
    ),
    ResetForm(Form_1);ResetForm(Form2);ResetForm(Form3);Back(),
    Notify("There is something wrong when you submit form data" & First(Errors(SPlist)).Message, NotificationType.Error)
)

 

Please 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.

View solution in original post

Highlighted
Super User II
Super User II

Re: validation of forms in powerapps

Hi @Ashok2 ,

Please note that the Submitform will work exactly like a patch, but if there are not changes to update, it won't send any data to the server which is quite cool.

 

Below is a method that we are using for form validation that is very easy to implement and works very well.

 

Let me know if you don't come right.

https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Microsoft-PowerApps-Form-Validation/m...

 

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 like it and mark this as the answer to close the topic and make it easier to find for other people with similar questions.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,561)