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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / show an error message ...
Power Apps
Unanswered

show an error message conditionally

(0) ShareShare
ReportReport
Posted on 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)
)
)
)
)
)
)
)

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

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard