# \*\*\*HELP\*\*\* Problem with Thunkable Real time database value update with UID user

**URL:** https://community.thunkable.com/t/help-problem-with-thunkable-real-time-database-value-update-with-uid-user/3496941
**Category:** Issues / Bugs
**Created:** [January 21, 2025, 11:34am UTC](https://community.thunkable.com/t/help-problem-with-thunkable-real-time-database-value-update-with-uid-user/3496941 "2025-01-21T11:34:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zanzaux909](https://avatars.discourse-cdn.com/v4/letter/z/9e8a1a/32.png) [@zanzaux909](https://community.thunkable.com/u/zanzaux909)
#### Post date: [January 21, 2025, 11:34am UTC](https://community.thunkable.com/t/help-problem-with-thunkable-real-time-database-value-update-with-uid-user/3496941/1 "2025-01-21T11:34:36Z")

</div>

Hi, I am sending values ​​from 2 ESP8266 devices to the RealTime Firebase in this way:  
data sent by each individual device:

## Device 1: String uid = “0OaciqwPf1NXnNvHB2RnVrXek5L2”; //(ESP1) String path = “/UsersData/” + uid; Firebase.setString(firebaseData,uid + “/Level”, Level);

## Device 2 : String uid = “0OaciqwPf1NXnNvHB2RnVrXek5L2”; //(ESP2) String path = “/UsersData/” + uid; Firebase.setString(firebaseData,uid + “/Level”, Level);

## Rules di RealTime Database: { “rules”: { “.read”: “true”, “UsersData”: { “$uid”: { .write": “true” // “.write”: “auth.uid !== null” }}}}

The data is received perfectly on Firebase Realtime Database, as shown in the attached photo.  
When the user logs in, I store a variable with the command “set stored variable uid to ‘user id’” (where user id is the Firebase user ID).

The problem arises on Thunkable: if I create a variable with “initialize cloud variable Level”, I don’t receive any data, since the value should be preceded by the user’s uid to be able to read it correctly.

I would like to know if it is possible to create a “multiple” variable, for example:  
“initialize cloud variable stored variable uid / cloud variable Level”  
Like this, when I use the function:  
“when cloud variable stored variable uid / cloud variable Level initializes or changes”,  
I would receive the constantly updated value in the app.

I also tried the method shown in the attached photo N°2, where each device correctly receives its value, but only when I open the app.

Can anyone kindly give me a suggestion on how to fix the problem?

 ![real_time_database](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/4/24e1aaca28204f66d03484a090c2208a161e814f.png)  
 ![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/6/b6201c98791bf3e12f2eb1f0b68fc8c8ee6c79e0.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 21, 2025, 3:37pm UTC](https://community.thunkable.com/t/help-problem-with-thunkable-real-time-database-value-update-with-uid-user/3496941/2 "2025-01-21T15:37:31Z")

</div>

It’s best to keep all of this information in a single topic: [Help with getting value from Firebase RealTime](https://community.thunkable.com/t/help-with-getting-value-from-firebase-realtime/3487272)

Otherwise, it’s confusing to try and help you because some of the previous details and advice is not included here.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 21, 2025, 3:38pm UTC](https://community.thunkable.com/t/help-problem-with-thunkable-real-time-database-value-update-with-uid-user/3496941/3 "2025-01-21T15:38:50Z")

</div>

I recommend that you do not initialize cloud variables. Just use the `set cloud variable " "` and `cloud variable " "` blocks when using cloud variables so that you can set the path each time, such as UsersData/[stored variable uid]/Livello
