cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ggalipeau
Level: Powered On

Form Validation without Submission


I am creating a PowerApps that submits to a SharePoint list. We have lots of fields, so we've designed the app in multiple steps (like a wizard). But, we can't find a way to validate required fields at each step without submitting the entire dataset to SharePoint or doing custom logic for each field individually. If we have all our fields marked as required in PowerApps, it seems like there should be a way to just say "Validate the form". But, we can't find it. Anyone know if this exists? If not, it should be added.  

3 REPLIES 3
Community Support Team
Community Support Team

Re: Form Validation without Submission

Hi @ggalipeau,

 

To submit one item to SharePoint list, all the required fields must have values. So you cannot submit part of the required columns in one form and then submit other required columns in another form. If you want to have multiple edit forms in multiple screens and then submit after all forms are filled, then you could use Patch function on the submit button in the last screen.

 

For your reference:

http://powerappspros.com/2017/05/powerapps-pro-tips-patching-sharepoint-lists/

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ggalipeau
Level: Powered On

Re: Form Validation without Submission

Hi @v-monli-msft,

Thanks for replying. Yes, I understand all that. But, my question was about validating "without" submitting. It seems ridiculous to me that you have to submit (or Patch) to validate. PowerApps knows what fields are required. So, logic would say that we should be able to validate whenever we want (without submitting). That's how most form builder apps I've worked with work. But, for some reason PowerApps forces us to submit (or Patch) to validate. Not very intuitive to a user to validate at the end of a process (like a multi-form scenario). I got around this limitation by building my own logic in on each form navigation. Basically, had to check each field value that was on the particular form. A lot of extra work when all the fields were already marked required in my opinion. Also, not very future proof (if another developer comes back in to work on the form they will have to remember to do this). I've already put a feature request in User Voice for this (https://powerusers.microsoft.com/t5/PowerApps-Ideas/Form-validation-without-Submission/idi-p/134725). I was just very surprised this wasn't already in the product. 

Greg

richcoresln
Level: Powered On

Re: Form Validation without Submission

I also discovered this problem when trying to achieve something similar.

Quite surprised that this does not exist already.

However, having the following on a screens "Next" buttons "OnSelect" function seems to work:

 

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

If there is a cleaner way to achieve this I'd be interested in knowing what it is.