Hi Team - as subject states: I want to create a login in screen with a password ONLY to access the other screens.
If the password is incorrect I want to have a text popup that says 'Try Again' or 'Contact Us'.
However I am a little bit lost and need some input please.
My Onselect for my login button:
If('password'.text = "1234",
Reset('password');
UpdateContext({PopUp:false]);
Navigate(ScreenHome)
If('password'.text = "summeriscool",
Reset('password');
UpdateContext({PopUp:false]);
Navigate(ScreenHome)
UpdateContext
({
Message Text: Incorrect. Try again.",
BadPasswordCount: Sum(Value(BadPasswordCount),1),
{);
Reset(password input)
);
If(BadPasswordCount = 3)
UpdateContext({PopUp:true})
Solved! Go to Solution.
Hi @SunshineK,
Could you please tell me that if the data type of the password in the Table1 in Text type?
Also, tell me that "&" operation means what, do you want to combine the strings with "&"? I want to explain to you that the "&" is an operator used to combine with two strings, but the formula in your scenario turns that there are two different conditions rather than two strings, so please replace the "&" with "&&" which means the "And".
Hope it could help.
Regards,
Qi
Hi @SunshineK,
Could you please share a bit more about the scenario, where do you set the variable MessageText and BadPasswordCount?
Please share more details about your configuration
From now on, I could help you modify a little bit as below:
If(
'password'.Text = "1234",
Reset('password');
UpdateContext({PopUp: false});
Navigate(ScreenHome),
If(
'password'.Text = "summeriscool",
Reset('password');
UpdateContext({PopUp: false});
Navigate(ScreenHome),
UpdateContext(
{
MessageText: " Incorrect. Try again.",
BadPasswordCount: Sum(Value(BadPasswordCount.Text),1)
}
);
Reset(BadPasswordCount),
If(
Value(BadPasswordCount.Text) = 3,
UpdateContext({PopUp: true})
)
)
)
Check if this could help you.
Regards,
Qi
Whoops - I probably shouldn't have two passwords.
So basically how I want it to work is when you open the app it asks the user to fill in a password, and then have a login button.
If the password is correct - it will take you to the home screen.
If the password is incorrect - it has a pop up on the login screen that says 'Incorrect Password' for 5 seconds.
If the password has been entered incorrect 3 times - it has a pop up on the login screen that says 'contact us' or 'try again'.
Hi Team - I have tried a different way ... only one error this time which is good.
password input format is 'Text'.
When I click the login button it does nothing.
Any suggestions?
Hi @SunshineK,
Could you please tell me that if the data type of the password in the Table1 in Text type?
Also, tell me that "&" operation means what, do you want to combine the strings with "&"? I want to explain to you that the "&" is an operator used to combine with two strings, but the formula in your scenario turns that there are two different conditions rather than two strings, so please replace the "&" with "&&" which means the "And".
Hope it could help.
Regards,
Qi
thank you so much. This worked!!
if I was to have the password as numbers - how would I make that work?
Hi @SunshineK,
If you have used the correct operator but have type of number, you should format the Username.Text as Value(Username.Text).
Only need to format the text string using the Value() function.
Regards,
Qi
User | Count |
---|---|
251 | |
105 | |
82 | |
51 | |
43 |