Page 1 of 1

Store data in Database per user

Posted: Fri Oct 17, 2014 7:36 am
by Andre Hoefs

Hi,

maybe it is a simple question but i could not find a solution:

in my app an user can fill some textfields.
Every user can fill them individually.

I'd like to store the inputs of every user of the app indivdually in the database and load the inputs when tue user opens his app.

Is it possible?

Thank you

André


Store data in Database per user

Posted: Fri Oct 17, 2014 11:58 am
by Kateryna Grynko

Hi André,

Yes. For example, you can create a collection to store data, and in one of its fields specify a pointer to user:
http://devcenter.appery.io/documentat...

Or you could add one more field to Users collection:
http://devcenter.appery.io/documentat...


Store data in Database per user

Posted: Mon Oct 20, 2014 9:23 am
by Andre Hoefs

Hi Kateryna,

thank you for your reply, but i#m still not able to slove my problem.
if i want to store the data, i think i need an uniquie identifier for each user to store the data in the collection.
i thought i could use the device id but i have no idea to get it, cause i'm not able to install a service for the the devices collection.
or is there any other way?


Store data in Database per user

Posted: Mon Oct 20, 2014 9:34 pm
by Yurii Orishchuk

Hi Andre,

It's not good way to use device id.

You should use for this goal userId. You can get user id after login processing.

So you should implement login/register processing.
Please take a look here how to implement it: http://devcenter.appery.io/tutorials/...

Then when use will have userId you can pass this "id" into your custom field while use creates new item.

So the goal is - new rows with filled "user" field.

Then you can filter items by current user id.

Regards.


Store data in Database per user

Posted: Tue Oct 21, 2014 11:49 am
by Andre Hoefs

Hi,

I'd like to avoid the login/register processing if possible.

It would also help if i would store the data locally on the device. Is this possible?


Store data in Database per user

Posted: Wed Oct 22, 2014 2:12 am
by Yurii Orishchuk

He Andre,

Yes, it can be implemented in that way.

You can get "deviceId" and use it like you need.

But you should look into some ACL of your app. May be you will need some restrictions in access level. If your app could have this logic in future it's recommended to use "registration" without user activity.

For example for user name you can use "deviceId".

Then you can login without user actions automatically and work like logined user.

Regards.


Store data in Database per user

Posted: Fri Oct 24, 2014 8:29 am
by Takis

Hi
Can you give us an example of we can make a "silent" mobile user registration for an app ?


Store data in Database per user

Posted: Sat Oct 25, 2014 5:26 pm
by Alena Prykhodko

Hello,

Could you please explain what does "silent" mobile user registration mean?