web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : Yeilq2h4UbuR0k4StMezv0
Power Apps - Building Power Apps
Unanswered

show an error message conditionally

Like (0) ShareShare
ReportReport
Posted on 1 Jun 2021 15:10:49 by 8

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)
)
)
)
)
)
)
)

---------------------------------------------------- 

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 01 Jun 2021 at 15:21:50
    Re: show an error message conditionally

    @PowerPlatform79 

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete