How do you store information into database for each user?

Hi! I am currently making an app for anxiety and depression, and when the user clicks on a button, once they finish an activity, the score at the bottom increases by 20 points. My issue is that I haven’t been able to make points specific to each user. For example, if one user has completed 3 activities and has gotten 60 points, all of the users have 60 points. I have connected it to firebase, but every single time a new user tries to get points, it overrides the previous user’s points. Below I have attached my code for the sign in screen and for the points screen. Thanks to anyone who can help me out!:slight_smile:

  1. you shouldn’t store your users id/password anywhere. why do you need this?

  2. make a stored variable named userID

    after the login , set stored userID to = the green userID block value from the login block

you have cloud username in the key path. you want to use the userID variable after you have set it on the login screen

Thanks I updated and below are screenshots it doesnt seem to work. Can you help see what I am missing?

You are trying to save userID to the teatime database for some reason.

Store that in a Variable. Not the realtimeDB

You can’t easily recall this value in such a manner

Start there

Thanks for the help. For some reason the score at the bottom says NaN when i do it for the second user, and it still overrides the other code.

I still wonder why you need to store a password/username combo. Those should be kept secret, why do you need that info.

Also, your code will always over write the past persons data.

See the Sandbox App and check out the screen cloud counter?

I looked at it and does that mean I should create a list. I’m really sorry for asking so many questions, I am very new to this app and just learning