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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (73,660)