cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LuccaGiffoni
Helper I
Helper I

Use the same login buttom and inputs with 2 different authentication lists

How you guys doing?

 

I have another doubt while building my app hahah.

I'm trying to do a login page that on the same buttom and inputs, I can make two differents acess to app: as an user or as an admin.

 

I was trying to run this code to verify both lists and find if the Username/Password check with one list:

 

If(LookUp('Lista de Administradores Credenciados', Title = AdminLogin_NameInput.Text && Senha = AdminLogin_PasswordInput.Text). Title, Navigate(AdminInterface),
LookUp('Lista de Usuários Credenciados', Title = AdminLogin_NameInput.Text && SenhaAdmin = AdminLogin_PasswordInput.Text). Title, Navigate(UserInterface))

 

Could someone help me to run this "Double Authentication"?

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@LuccaGiffoni 

Just add to it...

If(
    LookUp('Lista de Administradores Credenciados', 
        Title = AdminLogin_NameInput.Text && Senha = AdminLogin_PasswordInput.Text, 
        true
    ), 
    Navigate(AdminInterface),

    LookUp('Lista de Usuários Credenciados', 
        Title = AdminLogin_NameInput.Text && SenhaAdmin = AdminLogin_PasswordInput.Text,  
        true
    ), 
    Navigate(UserInterface),

    LookUp('Terceira Lista', 
        Title = AdminLogin_NameInput.Text && SenhaAdmin = AdminLogin_PasswordInput.Text,  
        true
    ), 
    Navigate(AnotherInterface)
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@LuccaGiffoni 

Please consider changing your Formula to the following:

If(
    LookUp('Lista de Administradores Credenciados', 
        Title = AdminLogin_NameInput.Text && Senha = AdminLogin_PasswordInput.Text, 
        true
    ), 
    Navigate(AdminInterface),

    LookUp('Lista de Usuários Credenciados', 
        Title = AdminLogin_NameInput.Text && SenhaAdmin = AdminLogin_PasswordInput.Text,  
        true
    ), 
    Navigate(UserInterface)
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
LuccaGiffoni
Helper I
Helper I

@RandyHayes That worked pretty nice! Thanks!

But what if I want to put a third list to authenticate it?

RandyHayes
Super User III
Super User III

@LuccaGiffoni 

Just add to it...

If(
    LookUp('Lista de Administradores Credenciados', 
        Title = AdminLogin_NameInput.Text && Senha = AdminLogin_PasswordInput.Text, 
        true
    ), 
    Navigate(AdminInterface),

    LookUp('Lista de Usuários Credenciados', 
        Title = AdminLogin_NameInput.Text && SenhaAdmin = AdminLogin_PasswordInput.Text,  
        true
    ), 
    Navigate(UserInterface),

    LookUp('Terceira Lista', 
        Title = AdminLogin_NameInput.Text && SenhaAdmin = AdminLogin_PasswordInput.Text,  
        true
    ), 
    Navigate(AnotherInterface)
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

LuccaGiffoni
Helper I
Helper I

Thank you very much!

You guys are amazing!

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,993)