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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Button OnSe...
Power Apps
Unanswered

Power Apps Button OnSelect Display Error

(0) ShareShare
ReportReport
Posted on by 67

Hi Members,

 

I had a requirement in Power Apps to create a Power Apps login screen. 

 

I have a SharePoint list [ACGH Login] with three columns:

  1. UserName [Title]
  2. Email
  3. Password

Error Login1.jpg

 

 

 

 

 

 

No. In my Power Apps, I have created a Login screen where users can log in using their Email/Username and password.
But, I was facing some small issues in my code.

 

If(
 IsBlank(txt_Email.Text) && IsBlank(txt_Password.Text),
 Set(
 var_EmailErrorMsg,
 "Enter an Email Address or User Name"
 );
 Set(
 var_PasswordErrorMsg,
 "Enter a Password"
 ),
 If(
 IsBlank(txt_Email.Text),
 Set(
 var_EmailErrorMsg,
 "Enter an Email Address or User Name"
 ),
 Set(
 var_EmailErrorMsg,
 ""
 )
 );
 If(
 IsBlank(txt_Password.Text),
 Set(
 var_PasswordErrorMsg,
 "Enter a Password"
 ),
 Set(
 var_PasswordErrorMsg,
 ""
 )
 );
 If(
 IsEmpty(
 Filter(
 'ACGH Login Details',
 Email = txt_Email.Text || Title = txt_Email.Text,
 Lower(Title) = Lower(txt_Email.Text)
 )
 ),
 Set(
 var_EmailErrorMsg,
 "Enter a Valid Email or User Name"
 ),
 Set(
 var_EmailErrorMsg,
 ""
 );
 If(
 IsEmpty(
 Filter(
 'ACGH Login Details',
 Email = txt_Email.Text || Title = txt_Email.Text,
 Password = txt_Password.Text,
 Lower(Password) = Lower(txt_Password.Text)
 )
 ),
 Set(
 var_PasswordErrorMsg,
 "Enter a Valid Password"
 ),
 Set(
 var_PasswordErrorMsg,
 ""
 );
 Navigate(HomeScreen)
 )
 )
)

 

 

I need to validate when a user enters both an incorrect Email/Username and Password. Both errors should be shown. Currently, the error message only appears near the Email/Username field, and the error is not displayed near the password field.

 


Error Login.jpg

 

Can anyone please suggest how I can achieve this? Thanks in advance!

 

 

Categories:
  • scalca Profile Picture
    on at

    it seems that your filter is not working correctly.
    try to change it to this
    the first filter
    Filter(
    pwlist,
    Lower(Email) = Lower(txt_Email.Text) || Lower(Title) = Lower(txt_Email.Text)

    )

    and the second one
    Filter(
    pwlist,
    Lower(Email) = Lower(txt_Email.Text) || Lower(Title) = Lower(txt_Email.Text),
    Lower(Password) = Lower(txt_password.Text)
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard