web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Make a login screen wi...
Power Apps
Unanswered

Make a login screen with Excel data

(0) ShareShare
ReportReport
Posted on by

Hello everyone,
This is my first post so please be understanding 🙂


I have a problem, I want to create a login page with 4 criteria: first name, last name, contract and team.
After the user has filled in the 4 corresponding fields, the user should be redirected to another screen.


My data is stored in an Excel table. With Excel I can delete and modify my users, if a user does not exist anymore, the app should not give him access anymore. A user that does not exist on the Excel table should not have access to the rest of the app.
My problem is as follows: at present, my app only checks whether a user is mentioned in the table, but does not do so by line, for example.
In my table, I have :

capture 2.PNG

 

See the following screen, it works :

capture3.PNGCapture6.PNG

 

but it also works if I do :

Capture4.PNGCapture.PNG

Because the app confirms that all the elements exist. However, they are 2 different users! So I don't want it to give him access. I have the same problem with the type of contract and the team my user is in. Everything is mixed up.


I tried 2 ways in Button do validate :

1st :

 

If(
 FirstNameIn.Text in PeopleTable.FirstName && 
 LastNameIn.Text in PeopleTable.LastName &&
 ContratDd.Selected.Contrat in PeopleTable.Contrat &&
 TeamDd.Selected.Team in PeopleTable.Team,
 Navigate(HomeScreen)
)

 

 

2nd but I don't understand where I can insert Navigate() :

 

Filter(
 PeopleTable,
 FirstName = DataCardValue1.Text,
 LastName = DataCardValue2.Text,
 Team = DataCardValue8.Text,
 Contrat = DataCardValue10.Text 
)

 


I hope to be understandable
Thank you in advance!

Categories:
I have the same question (0)
  • MF-12051538-0 Profile Picture
    402 on at

    Hi @Anonymous ,

    The function varUser().FullName should give you the name of the current user in Power Apps -- first and last name. What you could do is add a new column to your PeopleTable that combines the first and last name (i.e. "John Doe") and then use:

    If(
    varUser().FullName in PeopleTable.FullName &&
    DataCardValue8.Text = LookUp(PeopleTable, FullName = varUser().FullName, Team) &&
    DataCardValue10.Text = LookUp(PeopleTable, FullName = varUser().FullName, Contact),
    Navigate(HomeScreen)
    )



  • Community Power Platform Member Profile Picture
    on at

    Thanks for answer !

     

    So i try you solution but he told me "Invocation of unknown or unsupported function🤔

    I modify my component and I create form with DataCard like that :

    capture 2.PNG

  • MF-12051538-0 Profile Picture
    402 on at

    @Anonymous ,

    Could you please share the code that is giving you that error?

  • Verified answer
    Devikumari Krishna Profile Picture
    988 Super User 2024 Season 1 on at

    Hi @Anonymous ,

    Please follow this video https://youtu.be/Pus6pIIUJ18

    In this video excel is maintained in SharePoint list and validation is done based on user name and password maintained in excel. You can change the fields as per your requirement.

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

    Regards

    Devi

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard