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 :
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:
I have the same question (0)
  • scalca Profile Picture
    on at
    Re: Power Apps Button OnSelect Display Error

    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

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 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard