I created a SharePoint list form with power apps, and I changed a few of the fields to "required" in power apps (even though they are not required in SharePoint). When i fill out the form, if i skip a required field and try to save, the form stops me and provides an error just like i would expect it too.
BUT, once i populate the required field and press "save", nothing happens. it wont let me save the form and I have to cancel and start over in order to save.
has anyone else see this issue? is there a work around? maybe for the OnSuccess/OnFailure fields, but this is using the SharePoint integration, so Im not sure how those behave with the SharePoint save button.
Thanks for the help.
Solved! Go to Solution.
Hi @Dave9 ,
The best way to manage required fields is to do it in Power Apps. Do a check on the isBlank() property on the OnSave before the SubmitForm and do a Notify if the field is required.
If( isBlank(YourControlName), Notify("YourFieldLabelName is compulsory . . .",NotificationType.Error); SetFocus(YourControlName), SubmitForm(YourFormName) )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hey @WarrenBelz ,
Sorry I got distracted with a few other projects. I worked on this solution today and it does not seem to be working. It seems that the SharePoint integration piece does a lot more prior to the OnSave control. I added the IF statement like you suggested, but I havent recieved the notification when I press save because the PowerApps or SharePoint required fields checker runs first. This seems like it may be a bug. Once I have been notified that I missed a required field, I should be able to correct my mistake and then finish saving. But pressing the save button again does nothing.
Thanks @Dave9 ,
One thing I have learnt with SharePoint Integration is that the more you try to customize the in-built function (OnSave in particular), the less predicable the results. The is particularly the case with multiple screens, but I have also seen other examples such as yours may where as you have noted it will not pick up a blank control.
I have a workaround that generally does the job, but users need to be aware of it. I put all controlson the form with "standard" large icons at top right and tell users to use them and all seem to work well. I must admit I have not got a lot of SP forms where I need to do this as I tend to use stand-alone apps for more complex things, however most of my SP apps edit screens are actually copies of these pasted in (it is not difficult and saves a heap of time).
Keep up to date with current events and community announcements in the Power Apps community.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Check out the latest Community Blog from the community!