I want to create a custom login form with several conditions.
Here is the scenario: When users log in to the app, PowerApps only show the screen based on their position. for example:
- Mr. ABC as a Staff,
- Mrs. DEF as a Supervisor,
- then when Mr. ABC logs in, he just gets a Staff screen
- and when Mrs. DEF logs in, she can access to Staff and Supervisor screen
I already create a table on Data Source with Name, Email, Password and Position column. On Canvas App:
- I set TextInput1 (Email)
- TextInput2 (Password)
- and button1 (Login)
On button1: I set a function on OnSelect event
If(LookUp('MyDataSource', Email = TextInput1.Text, Password)=TextInput2.Text, Nagivate(StaffScreen,None))
This action is just only taken users to Staff Screen.
How to solve this problem?