Hello All,
I have one requirement on my App , i want to save login details for the next login so that no need to enter the credentials again by user.
On my login page user name is a combo box which pick data from SQL table ,user search for their name and chose it.
Password is a text box field.
I believe this should be possible by SaveData () function and collection , but how to achieve that i am not sure. if anyone knows any better approach than this please advise.
user use App in their phone , so last login details should be picked automatically.
Hi, regarding your issues:
1.- your controls will have a horrorific red x. As is experimental in the editor mode is ok to be shown.
2.- must set the value
LoadData(colSession,"SessionUser")
OnVisible of your Screen1, my bad I edited the last message.
3.- Storing it in the backend could be a better choise in powerapps, The data saved with SaveData is not encrypted. But all depends on your architecture, requeriments, etc..
regards.
Hello @PabloRoldan ,
Thanks for looking into this issue , i applied your solution but its not working as expected. below are the findings.
1.Runtime Error : Data cannot be saved when running in a web browser
2. I did not find PROPERTY:OnVisible, on canvas app so i set the load data on property ONStart
3.If we will not store this session details (username , Password ) somewhere at backend , after refreshing or killing the App it will again show the default username and no filled password. which is very frequent in my case
Please mention your comment on this
Hi, Currently what you need is not supported(A Session Cookie) by MS Power Apps, you'll need to store that session in another SQL Table or Excel Sheet.
By using SaveData and LoadData could do the trick but it's an Experimental feature:
steps:
Turn it on
with your form like this set this formulas
PROPERTY:DEFAULT
CONTROL:TextInput User
ValueFormula:First(colSession).user
PROPERTY:DEFAULT
CONTROL:TextInput Password
ValueFormula:First(colSession).password
PROPERTY:OnSelect
CONTROL:Button Login
ValueFormula:
ClearCollect(colSession,{user:txt.Text,password:pwd.Text});
SaveData(colSession,"SessionUser");
PROPERTY:OnVisible
CONTROL: YOUR_CURRENT_CREEN e.g:Screen1
ValueFormula:LoadData(colSession,"SessionUser")
regards
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473