Hi @HendosMark ,
Do you set the fields within your Edit forms as Required via setting the Required property of the Data card in the Edit form?
Do you want the validation also to be worked when you use Patch function to submit the rest of Edit forms data?
If you want the the validation also to be worked when you use Patch function to submit the rest of Edit forms data, I afraid that there is no way to achieve your needs.
The Required property of the Data card control within the Edit form only works when you use SubmitForm() function to submit form data. When you use Patch function to submit your form data, the error message would not show up.
The user @ck25415 has faced same issue with you, please check my response within the following thread:
https://powerusers.microsoft.com/t5/General-Discussion/Required-field-error-message-not-displayed-when-using-Patch/m-p/305563
As an alternative solution, please take a try with the following two solutions:
1. Set these fields in your SP list itself as Required field:
You could set these fields in your SP list itself as Required field, then modify your Patch function as below:
If(
!IsEmpty(
Errors(
'YourSPList',
Patch('YourSPList', EditForm1.LastSubmit, Form2.Updates) /* <-- Type your Patch formula here */
)
),
Notify(First(Errors('YourSPList')).Column & " " & First(Errors('YourSPList')).Message, NotificationType.Error)
)
Please consider take a try with the first solution mentioned within above thread I provided, then check if the issue is solved.
2. You could add a If function to your formula, to check if the specified Required field is not populated with values, if true, show an error message:
Modify your Patch formula as below:
If(
IsBlank(DataCard1InForm2.Text), /* <-- Check if the specific Required field text box is populated with values */
Notify("The Column1 is a Required field, please type a valid value within it!", NotificationType.Error),
IsBlank(DataCard2InForm3.Text),
Notify("The Column2 is a Required field, please type a valid value within it!", NotificationType.Error),
...
...
Patch('YourDataSource', Defaults('YourDataSource'),{Title: "PowerApps R", ...}) /* <-- Type your Patch formula here */
)
Note: The DataCard1InForm2 , DataCard2InForm3 ... represents the different data cards in your different Edit forms.
Please consider take a try with the second solution within the above thread I provided.
Please take a try with above solution, then check if the issue is solved.
Best regards,