# How do you store information into database for each user?

**URL:** <https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271>\
**Category:** Questions about Thunkable X\
**Created:** [April 12, 2020, 9:56pm UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271 "2020-04-12T21:56:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaneshaharigq67x](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vaneshaharigq67x](https://community.thunkable.com/u/vaneshaharigq67x)\
**Post date:** [April 12, 2020, 9:56pm UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/1 "2020-04-12T21:56:05Z")

</div>

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!🙂

 ![Screen-4-12-2020_23613_PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/e/aed2a751fdd78aa287fea8be34564c2d77c58b5d.png) ![Screen-4-12-2020_23741_PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/77f96ef259491a5f810986095b1b15f028d803bc.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 13, 2020, 4:46am UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/2 "2020-04-13T04:46:02Z")

</div>

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

2. make a stored variable named userID

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

---

<div class="post-metadata">

**Author:** ![vaneshaharigq67x](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vaneshaharigq67x](https://community.thunkable.com/u/vaneshaharigq67x)\
**Post date:** [April 13, 2020, 11:01pm UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/3 "2020-04-13T23:01:58Z")

</div>

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

 ![goalsscreen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b03cf3be6129c0e75c1e918cd555a70971811ae1.jpeg) ![loginscreen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/3/c30b0da61b0e8f547912247fb38c1eb36d5ea44b.jpeg)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 13, 2020, 11:10pm UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/4 "2020-04-13T23:10:01Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/b/6b07e50f28126a7bc0a1ca39cbf58b3d8ed6bcba.jpeg)

---

<div class="post-metadata">

**Author:** ![vaneshaharigq67x](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vaneshaharigq67x](https://community.thunkable.com/u/vaneshaharigq67x)\
**Post date:** [April 14, 2020, 12:18am UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/5 "2020-04-14T00:18:31Z")

</div>

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.

 ![Capture](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cd1f153b1d5e12c2b1757dee54a5ca759be32ab0.png) ![goals screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/48d406a38b3006f8e7958e1df60e9462e233d3a2.png) ![login screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e315a15ccfcf46b062b687b0227cf2068d3a9ef7.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 14, 2020, 12:28am UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/6 "2020-04-14T00:28:11Z")

</div>

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?

> **[jaredgibb.xyz](http://jaredgibb.xyz/thunkable/sample-apps/)**
>
> This domain may be for sale!

---

<div class="post-metadata">

**Author:** ![vaneshaharigq67x](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vaneshaharigq67x](https://community.thunkable.com/u/vaneshaharigq67x)\
**Post date:** [April 14, 2020, 12:55am UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/7 "2020-04-14T00:55:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:39am UTC](https://community.thunkable.com/t/how-do-you-store-information-into-database-for-each-user/563271/8 "2024-11-08T11:39:03Z")

</div>


