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

How to Trigger Field Validation Error Messages on Multi-Page Forms

I have created a three page SharePoint list form that has all but three fields as required. However, when I try to submit the the form with some fields being empty, it does not alert the user that the field is empty and the form is still submitted. Currently, I have a save button at the end of the form with the following code used OnSelect:


Patch('Contingent Worker Onboarding',Defaults('Contingent Worker Onboarding'),CWInfo_Form.Updates,JobInfo_Form.Updates,OtherCompany_Form.Updates)

Ideally I would like for it to set off the Error notifications that are trigged by default when using OnSubmit as shown below. Right now it I can only get this to work using the default Save button in SharePoint and it only works for the first page.
















I've tried searching online but I cannot find any good examples/best practices on how to accomplish this efficiently. Everything I found shows how to use Patch on a Multi-page form but not how to manage validations. I also, have the following questions:


1. Would it be better to validate the fields after the entire form is filled out? Or would it be best to validate these fields when they click on the next button before they go to the next page?

2. Since my fields are required when I use Patch should I explicitly add every field in order for the validation to work or should continue to use what I am using (see code above).

3. I noticed when I use my custom save button to submit, when the user goes back to view/edit the form all but the first form fields are blank eventhough in the SharePoint list they all have values. How can I fix this?


Here are screenshot of my form for more information:


All the required fields are set on the List level and on the PowerApps form




SharePoint Integration Settings.




First Page of the Form


Screen: CWInfo

Form: CWInfo_Form



Next Button OnSelect

NewForm(JobInfo_Form); Navigate(JobInfo,ScreenTransition.Fade)



Second Page of Form

Screen: JobInfo

Form: JobInfo_Form




Next Button OnSelect

NewForm(OtherCompany_Form); Navigate OtherCompany,ScreenTransition.Fade)



Third Page of Form

Screen: OtherCompany

Form: OtherCompany_Form




Save Button (Same as Above):

Patch('Contingent Worker Onboarding',Defaults('Contingent Worker Onboarding'),CWInfo_Form.Updates,JobInfo_Form.Updates,OtherCompany_Form.Updates)


Any advice would be greatly appreciated!


oooooohhH!! Thats pretty slick @richcoresln !!
Does that work for partial form submissions?

  • 60 field form
  • Split into "Subforms" for usability
  • Can you check .Valid on a certain section (Form1), then, IF Valid, move to next section (Form2)
  • Repeat, but have each SubForm submit results (Patch, really) to the original record?

That sounds useful.

@seadudeyes that is kind of what is being achieved by using this:


If(!Form1.Valid, SubmitForm(Form1), Navigate(CustomFormScreen2));

This is on a "CustomFormScreen1" screens "Next" buttons "OnSelect" function.

This screen would not contain the entire data set available to Form1, with "CustomFormScreen2" containing a "Form2" with the remaining data set.

This could of course be repeated n number of times as necessary (achieving subforms).


We will only be calling Submit for the form when it is not valid; this results in the internal form validation being carried out (and failing as expected) and the forms error messages being displayed, but the submit function does not succeed. To answer your question, a form only seems to validate fields which have been added.

I agree this seems counter-intuitive which is why I would be interested if there was a cleaner way of achieving this (such as a form.Validate() function, however it does not appear so:


For completeness, the final form to "Submit" all the previous partial forms would be achieved via patch, this could look something like the following:


// Then
// Else
    // Then
            "Failed to submit, check your internet connection and try again.",
    // Else
            "Subitted new record.",

@richcoresln That is nifty! Complex issue solved with a simple fix! Thanks!

Not applicable

There is a 500 Control limit so there is a limit how big your single screen can be

Not applicable

If its low code no code this needs to be easy to do, otherwise simple Tasks are easier in Full Stack 

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,768)