Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Store data in Database per user

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é

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Store data in Database per user

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...

Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Store data in Database per user

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Store data in Database per user

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.

Andre Hoefs
Posts: 0
Joined: Fri Jul 25, 2014 8:14 pm

Store data in Database per user

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Store data in Database per user

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.

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Store data in Database per user

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Store data in Database per user

Hello,

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

Return to “Issues”