# Cloud variable connected to user ID not storing

**URL:** <https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, beginner, help\
**Created:** [September 7, 2021, 12:35am UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203 "2021-09-07T00:35:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![expressmojivyl6rx](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@expressmojivyl6rx](https://community.thunkable.com/u/expressmojivyl6rx)\
**Post date:** [September 7, 2021, 12:35am UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/1 "2021-09-07T00:35:45Z")

</div>

Hello,

I have followed the sign in and cloud variables tutorials and seen multiple threads for my project involving storing a username for a particular user. I have a firebase database connected to my project as well and initialized the userID variable. However, the cloud variable is only saving while I am staying on the same screen. When I go to a new screen, the data suddenly goes back to null. Below are screenshots of my code.

 ![3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/a/7a9cbc956fb27eeb6f3581e579e9b7052446a658.png)  
 ![4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/31bbd4e4ebb552dfd9e7b70a1b3b0304e088c389.png)  
 ![5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/c/3cdbcf7b7a22f0c1c55261f6f649ee2cc2c5a2e4.png)

What should I do?

---

<div class="post-metadata">

**Author:** ![expressmojivyl6rx](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@expressmojivyl6rx](https://community.thunkable.com/u/expressmojivyl6rx)\
**Post date:** [September 7, 2021, 12:37am UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/2 "2021-09-07T00:37:03Z")

</div>

Some background: chatlist is the main screen after logging in. When you click the settings button on the chatlist screen it takes you to the profile screen. You can “savenewname” on the profile screen.  
By “saving while I am staying on the same screen,” I mean that when I save a new name on the profile screen the new name will display, but if I go to another screen and come back it will be back to null.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 7, 2021, 1:46pm UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/3 "2021-09-07T13:46:24Z")

</div>

You are using `cloud variables` the wrong way. You are actually combining `cloud variables` with `app variables` which results in unexpected behavior.

---

<div class="post-metadata">

**Author:** ![expressmojivyl6rx](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@expressmojivyl6rx](https://community.thunkable.com/u/expressmojivyl6rx)\
**Post date:** [September 12, 2021, 11:52pm UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/4 "2021-09-12T23:52:49Z")

</div>

How come they are used together in this tutorial video then?

[![](https://img.youtube.com/vi/KvFvSkG6G-k/maxresdefault.jpg "Cloud Variables - Save User Data to the Cloud in Thunkable Drag and Drop UI") ](https://www.youtube.com/watch?v=KvFvSkG6G-k&t=8s)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 13, 2021, 1:47am UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/5 "2021-09-13T01:47:28Z")

</div>

Not the same way you used it. Do exactly as in the video and it will work.

---

<div class="post-metadata">

**Author:** ![evanskemboi81514f3sv](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@evanskemboi81514f3sv](https://community.thunkable.com/u/evanskemboi81514f3sv)\
**Post date:** [June 7, 2024, 12:10pm UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/6 "2024-06-07T12:10:16Z")

</div>

it’s actually not working

---

<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, 1:16pm UTC](https://community.thunkable.com/t/cloud-variable-connected-to-user-id-not-storing/1491203/7 "2024-11-08T13:16:58Z")

</div>


