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 Apps
Answered

login

(0) ShareShare
ReportReport
Posted on by 256

Hello,

 

I have to do a loging screen in one app. How should I do?

If were on php and mysql i could prepare a form with email and password to compare to data strored in a table.

But in power apps how can I do? Wich is the sintax?

I thought something like this:

If(_email.Text = Or('kuygonigh@tvf7iyugbh.com';'ioibguniouh@u5rtfg7hygu.com'); Navigate(page1;ScreenTransition.Fade); Navigate(pagina2;ScreenTransition.Fade));

But In this if there is not the comparison with data stored.

Categories:
I have the same question (0)
  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    @Utente_365_1fl  you can do the same, check with email and passwod.

     

    When they register in the app they create email and password and store it in a table

     

    to chech you can use coutrows(filter;user; email=txtemail.text))>0 to check if user  exists and lookup to check if password is the same 

  • Utente_365_1fl Profile Picture
    256 on at

    I wrote down this and put in onselect property in the button, but in the second lookup the program says that I have to put a boolean value;

     

    If(
    //se il campo non vuoto verifica se il nome è nel data base
    !IsBlank(
    LookUp(
    dpi_login;
    email = email_txt.Text && password = password_txt.Text
    )
    );// fine !isblank
    //condizione vera > se è compilato
    If(LookUp(dpi_login; ruolo = "admin");
    Navigate(Equipaggiamento;ScreenTransition.Fade);
    Navigate(Storico_1;ScreenTransition.Fade)
    );
    //condizione falsa > se non è compilato
    Navigate(Errore;ScreenTransition.Fade)
    )

  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    @Utente_365_1fl 

    In this lookup?

    If(LookUp(dpi_login; ruolo = "admin");
    Navigate(Equipaggiamento;ScreenTransition.Fade);
    Navigate(Storico_1;ScreenTransition.Fade)
    );

     

    can you upload an screenshot?

  • Utente_365_1fl Profile Picture
    256 on at

    Yes, here it is!screen_login.png

  • Utente_365_1fl Profile Picture
    256 on at

    The logic is this:

    if login&password are correct

    if the operator is admin, navigates to page1

    else navigate to page2

    else navigates to error_page

  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    @Utente_365_1fl 

    Set the condition of the lookup, for example if the lookup is not blank.

    in other words, the lookup itself does not have a condition, you have to tell it for example

     

    If(isblank(LookUp(dpi_login; ruolo = "admin";FIELD));
    Navigate(Equipaggiamento;ScreenTransition.Fade);
    Navigate(Storico_1;ScreenTransition.Fade)
    );

  • Utente_365_1fl Profile Picture
    256 on at

    MM interesting...

    on your opinion what should i write instead of Field in this line If(isblank(LookUp(dpi_login; ruolo = "admin";FIELD));

     

  • Utente_365_1fl Profile Picture
    256 on at

    if I write this way it plays!

    If(
    !IsBlank(
    LookUp(
    dpi_login;
    email = username_txt.Text && password = password_txt.Text
    )
    );
    //valore vero di if
    Navigate(HOME;ScreenTransition.Fade);
    //valore falso di if
    Navigate(
    ERRORE;
    ScreenTransition.Fade
    )
    )

     

    But I want a third controll: if the role is admin, navigate to welcomePage1; else navigate to welcomePage2

    I try to put in the true value of the if a second if with a lookup but doesnt'play:

     

    If(
    !IsBlank(
    LookUp(
    dpi_login;
    email = username_txt.Text && password = password_txt.Text
    )
    );
    //valore vero di if
    // Navigate(HOME;ScreenTransition.Fade);
    If(
    LookUp(dpi_login;ruolo = "admin");
    Navigate(HOMEadmin;ScreenTransition.Fade);
    Navigate(HOMEoperaio;ScreenTransition.Fade)
    )
    //valore falso di if
    Navigate(
    ERRORE;
    ScreenTransition.Fade
    )
    )

  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    @Utente_365_1fl 

     

    you have to nest ifs

    if(........;navigate ();if(.......navigate....;))

    I think in the second if you have put the true and false condition in the second if,

    I think it's the order of the ifs that you have wrong, the structure of the

    If I helped you give me a like or mark the solution as accepted.

  • Utente_365_1fl Profile Picture
    256 on at

    I know I Have to nest them! Didn'T I?

    May be lookup can't compare values posted by a form with strings because I'm tryng and tryng but alway tells "me incompatible types for comparison. you can't compare these types: number, error"

     

    MAy I share the app with you to take a chek?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard