cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
twarb
Frequent Visitor

Password setup- these types can't be compared- error, text

Hi everyone,

I'm trying to add an admin login for an app I'm building and I can't figure out the coding error I keep getting.

The code is here:

If(passwordfield.text = "sampletext", Navigate(adminsettings), Navigate('admin login',Reset(passwordfield))

The error I'm getting is: "Incompatible types for comparison. These types can't be compared: Error, Text."

 

Please help!!
Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
jbrit2020
Continued Contributor
Continued Contributor

Do this:

 

If(passwordfield.Text = "sampletext", Navigate(adminsettings), Navigate('admin login');Reset(passwordfield))

View solution in original post

5 REPLIES 5
timl
Super User
Super User

Hi @twarb 

I assume this is what you're trying to do. If the password that the user enters matches "sampletext", navigate to the adminsettings screen. Otherwise, navigate to the 'admin login' screen.

 

If(passwordfield.text = "sampletext", 
   Navigate(adminsettings), 
   Navigate('admin login');
   Reset(passwordfield)
)

 

C-Papa
Super User
Super User

try the below

 

If(passwordfield.text = "sampletext", Navigate(adminsettings), Navigate('admin login');Reset(passwordfield))

jbrit2020
Continued Contributor
Continued Contributor

Do this:

 

If(passwordfield.Text = "sampletext", Navigate(adminsettings), Navigate('admin login');Reset(passwordfield))

twarb
Frequent Visitor

this one worked, thank you mate!

jbrit2020
Continued Contributor
Continued Contributor

Glad the community could help. Mark whichever answer that gave you the solution as correct.

 

Regards

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,671)