I have a submitter's screen that contains some required fields. When users submit a request with any of the required fields missing, an error message is supposed to show. Recently, I added one more required field and then tested if the error message appears when the field value is missing. I found it not working. Could you take a look and provide your suggestion(s)?
----------------------------------------------------
If(
IsBlank(DataCardValue58.Text),/*Title*/
Set(Error_Submit, true),
If(
Or(IsBlank(DataCardValue60.Selected) && IsBlank(DataCardValue60.SearchText)),/*Resource Type*/
Set(Error_Submit, true),
If(
IsBlank(DataCardValue61.Selected),/*Format*/
Set(Error_Submit, true),
If(
IsBlank(DataCardValue116.Text),/*Product Link*/
Set(Error_Submit, true),
If(
IsBlank(DataCardValue66.Text),/*Original Requester*/
Set(Error_Submit, true),
If(
IsBlank(DataCardValue67.Text),/*Reason for Request*/
Set(Error_Submit, true),
If(
IsBlank(DataCardValue68.Selected),/*College with Interest*/
Set(Error_Submit, true),
Set(Error_Submit, false);
ClearCollect(PathedItemCollection,
Patch
(...);PowerAppsButtonSubmitter.Run(First(PathedItemCollection).ID);ResetForm(Form_Request);ResetForm(Form_Attachment);Navigate(RequesterSuccessScreen, None)
)
)
)
)
)
)
)
----------------------------------------------------
You really not need to do any of this as you are using an EditForm.
If you have required fields in your form, then you can simply reference the .Valid property of the form.
So, your formula would become:
Set(Error_Submit, !yourForm.Valid)
I hope this is helpful for you.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473