Hi, good afternoon to everyone, I have this function:
If(LookUp('[dbo].[usuarios]'; usunom = TextInput4.Text; usucontra) = TextInput6.Text; Navigate(Screen1;ScreenTransition.Fade);Navigate(Label36;ScreenTransition.Fade;{incorrecto:1}))
In which I have armed a table in sql containing grupoid (int), id (int), usunom, usucontra.
The function to check if the user exists or not, everything works fine but I also need to enter no data to verify in which group this is and depending on the group in which you are navigate to the corresponding page. If you can help me it would be great. From already thank you very much
Solved! Go to Solution.
Hi @jdelacrettaz,
I got your idea. Please try with the code below:
If( !IsBlank(filter('[dbo].[usuarios]', usunom=TextInput4.text) ), If( lookup('[dbo].[usuarios]', and(usunom = TextInput4.Text, usucontra = TextInput6.Text), grupoid )=1, Navigate(Screen1;ScreenTransition.Fade), Navigate(Screen2;ScreenTransition.Fade) ), "User Does not exist" )
The first if checks whether user exists in the table, if user name exists (the filter table is not blank), it will then check if the user and the password matches the one recorded, find the match and the nreturn the grupoid from the record with lookup function, then naviagte to the proper screen (this step assume you only have two grupoid),
If user does not exist, the formula above would then show text
"User Does not exist"
Or you may change this part to the formula you prefer.
Regards,
Michael
Complete the idea, I have armed the table as follows
grupoid id usunom(name) usucontra(password)
1 1 jonathan hellow
1 2 rodrigo yes
2 3 Susana red
As you can see susana has another group id, so what I want to do is to find me whether or not the user exists, if the user exists and the password is fine, I want you to tell me which group this is. Once I find in what group it is I want to do an if it asks if the group is 1, that it does a navigate to a screen and if the group is 2 it navigates to another different screen. If anyone has any ideas to help me I would appreciate it. From already thank you very much
Hi @jdelacrettaz,
I got your idea. Please try with the code below:
If( !IsBlank(filter('[dbo].[usuarios]', usunom=TextInput4.text) ), If( lookup('[dbo].[usuarios]', and(usunom = TextInput4.Text, usucontra = TextInput6.Text), grupoid )=1, Navigate(Screen1;ScreenTransition.Fade), Navigate(Screen2;ScreenTransition.Fade) ), "User Does not exist" )
The first if checks whether user exists in the table, if user name exists (the filter table is not blank), it will then check if the user and the password matches the one recorded, find the match and the nreturn the grupoid from the record with lookup function, then naviagte to the proper screen (this step assume you only have two grupoid),
If user does not exist, the formula above would then show text
"User Does not exist"
Or you may change this part to the formula you prefer.
Regards,
Michael
This code need user to register first before login or the login details already provided in database and link to text input, and user simply login the page by the ID and Password already given/exist ?
May I know what data storage this code using? If im using excel is that possible ?
can you give some direct solutions.... apperciate your kind assistance, thank you
rgd
azzamkaz
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
190 | |
70 | |
50 | |
38 | |
28 |
User | Count |
---|---|
243 | |
114 | |
91 | |
91 | |
71 |