Page 1 of 1

storing variables in local storage

Posted: Thu Aug 27, 2015 3:47 am
by kate7614900

Hi
Is there a javascript for me to write? I want to store a variable from the default user collection column from a database into the local storage.
Is this the correct way --- localStorage.setItem(‘userId’,({ Apperyio.User.id:_id}));


storing variables in local storage

Posted: Thu Aug 27, 2015 7:18 pm
by Serhii Kulibaba

Hello Kate,

Please look this documentation: https://devcenter.appery.io/documenta...


storing variables in local storage

Posted: Fri Aug 28, 2015 1:32 am
by kate7614900

How do I use this the getUserId in this document:
https://devcenter.appery.io/documenta...

Is it something like this
Apperyio.User.getUserId({"username": "test", "password": "test"}).then(function(result){
alert("success" + JSON.stringify(result));
},function(error) {
alert("error" + JSON.stringify(error));
});

But how do I make the "username":"test" into "username:"database_columnName" ?


storing variables in local storage

Posted: Fri Aug 28, 2015 2:49 am
by kate7614900

Hi
I solve it already. Thanks