I have this problem: I have a login screen with two text entrys, "UserEntry" and "PasswordEntry", and i want to make the verification via an excel table in the app, the table it's named "Users" and it has the columns "UserName" and "Password", i need to compare if the UserEntry.Text is equal to one of the UserName registered, and if the Password.Text matchs the corresponding UserName Password column, if it's correct, it will send you to another screen, but if the username, and/or the password are wrong, then a invisible label with an error text will turn visible.
It's any form to do this? if not, how can i make it throught another way like making a collection? (and not making an infinite If inside the button with all the passwords and usernames).
And thank you in advanced for your responses!.
Solved! Go to Solution.
Hi @Anonymous
Here's a similar thread on this issue:
To implement this, you can add the following formula to your Login button.
If(CountRows(Filter(Users,And(UserEntry.Text = UserName,PasswordEntry.Text = Password))) = 1, Navigate(TheScreenThatYouWantToNavigateToOnSuccess), Notify("Incorrect Login Details",NotificationType.Error) )
As a sidenote, I really recommend against the idea of storing usernames and passwords in Excel, or any other data source.
In order for this technique to work, all users will require access to the underlying Excel spreadsheet. Therefore, any user can circumvent the security by directly opening the spreadsheet and looking up the usernames/passwords. A far better way to secure your app is to use the built in sharing functionality and to only share your apps with users that require access to your app.
Hi @Anonymous
Here's a similar thread on this issue:
To implement this, you can add the following formula to your Login button.
If(CountRows(Filter(Users,And(UserEntry.Text = UserName,PasswordEntry.Text = Password))) = 1, Navigate(TheScreenThatYouWantToNavigateToOnSuccess), Notify("Incorrect Login Details",NotificationType.Error) )
As a sidenote, I really recommend against the idea of storing usernames and passwords in Excel, or any other data source.
In order for this technique to work, all users will require access to the underlying Excel spreadsheet. Therefore, any user can circumvent the security by directly opening the spreadsheet and looking up the usernames/passwords. A far better way to secure your app is to use the built in sharing functionality and to only share your apps with users that require access to your app.
Wow, thank you! that solved the problem for my login button 🙂 the thing is, is not going to be a public app, it's going to be a private app with 2 types of users, admins and interns, so i needed the login for put the difference between those two, if putting the excel information in the app is not that secure, what will you recommend? i have all the information of the app (the login and the inventory info) in Excel tables, all linked throught an account of Onedrive.
Hi @Anonymous
Sorry for the delay in responding. Adding this type of role managment on apps based on Excel/OneDrive is difficult because of this issue.
The most secure workaround would be to create 2 apps - one for users, and the other for admins/interns. You would then share the admin app with only the admin users. If you have any data that only admins can access, you can store this in a different Excel spreadsheet and configure your Onedrive settings so that only admin users can access the spreadsheet.
Well, thank you for the tips, it will become very handy in the future, you helped me a lot!
@timl wrote:Hi @Anonymous
Sorry for the delay in responding. Adding this type of role managment on apps based on Excel/OneDrive is difficult because of this issue.
The most secure workaround would be to create 2 apps - one for users, and the other for admins/interns. You would then share the admin app with only the admin users. If you have any data that only admins can access, you can store this in a different Excel spreadsheet and configure your Onedrive settings so that only admin users can access the spreadsheet.
User | Count |
---|---|
171 | |
95 | |
74 | |
72 | |
58 |
User | Count |
---|---|
215 | |
166 | |
97 | |
93 | |
74 |