I have a sharepoint list with 20+ columns, and i am using forms for these columns.
I have created more than 2 screens and using below formula
Patch(DataSource, Item_Being_Edited, Form1.Updates, Form2.Updates, Form3.Updates).
This query saves the data perfectly in the list.
But while saving the data, it does not give validation error even if one of my field is blank (when using "SubmitForm()" function it gives validation error)
Is there any way to achieve this using forms those are on more than 2-3 screens?
What did you mean by it give validation error if one field is blank. If the fields are not marked as required from SharePoint list, then when you submit the record from PowerApps, even if this field is empty, there will be no error.
Hello @abd3127. Be sure to use the "Required" property for data cards that you want to flag. This should prevent user from submitting a form that has missing fields.
Now when user submits form, if the field is blank, it won't allow form to be submitted until user adds a value.
PRO TIP: Don't delete the "error message" and "star" controls from the default data card. It defeats much of the above solution.
Hope this helps.
I am using form which is spanned on 3 screens.
I know that if a form is present on only 1 screen then we can use "Submit form" for the validations.
Right now as my form is on 3 screns and i am using patch function with form1.updates, i am not getting the default validation
You might consider creating a single-screen app and controlling the form fields with Visibility instead of having 3 separate screens. I recently did this with an 80+ field form and it works great.
I am really curious on how to make the Validate function work with patching new records...
So, when you wrote
I have to ask you how did you get the Item_Being_Updated ?
I mean, for a creation of a record, I obviously can't write "Lookup(MyDataSource,Id=IdDataCard.Text)"
Yhanks for giving me a hand 😉
You could consider checking if the forms are valid before submitting. If a card is required but doesn't have a value, the card's value for valid is false which in turn rolls up to the form which will also have a valid of false.
Please check below video that shows how .Valid can be used.
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 mark this as the answer to close the topic and make it easier to find for other people with similar questions.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.