# Cloud variables path in Firebase Real-time Database

**URL:** <https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210>\
**Category:** Questions about Thunkable X\
**Created:** [May 12, 2019, 8:12pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210 "2019-05-12T20:12:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [May 12, 2019, 8:12pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/1 "2019-05-12T20:12:54Z")

</div>

Hey all

So, does anyone know if cloud variables can only be stored in the Firebase Real-time Database’s root or if they can also be stored in a specified path (i.e. /users/abc/cloudVariableName)

Thanks  
K

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [May 12, 2019, 11:54pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/2 "2019-05-12T23:54:29Z")

</div>

![Screenshot_2019-05-12%20Thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/6/d61935d8f5b7bc435ae90ec0dd8ee24a5e7e68a6.png)

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [May 13, 2019, 10:17am UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/3 "2019-05-13T10:17:14Z")

</div>

Hey Max

Thanks for your response. It appears that your approach does not use cloud variables as defined in the [official documentation](https://docs.thunkable.com/variables) but rather create a key in the Real Time database which is not what I am referring to.

Kind regards  
K

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 13, 2019, 1:58pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/4 "2019-05-13T13:58:21Z")

</div>

Hey,

It works great

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/4/74850434fd8a44e4e4c3943c2d18ba8b474c2e13.png)

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [May 13, 2019, 2:32pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/5 "2019-05-13T14:32:59Z")

</div>

Hey ACtech

Works but you can’t use it dynamically meaning, you can use it like “cloud 101/USERID/Age” where USERID can be anything. I mean… if something like “cloud 101/$USERID/Age” would work, that would be great. Any ideas?

K

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 13, 2019, 5:00pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/6 "2019-05-13T17:00:17Z")

</div>

You are right, it is impossible to do this dynamically using variables. But you can use InterBase JavaScript API.

---

<div class="post-metadata">

**Author:** ![aniolpages](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/aniolpages/32/62948_2.png) [@aniolpages](https://community.thunkable.com/u/aniolpages)\
**Post date:** [May 13, 2019, 7:16pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/7 "2019-05-13T19:16:28Z")

</div>

Hello,

you can try to create a object:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/b/9bc553c42813f3cfd56bfbed84476126dfbb9b02.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/29a107043d9d288060b68c0481fc69ac090d4e92.png)

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [May 13, 2019, 7:54pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/8 "2019-05-13T19:54:26Z")

</div>

Interesting… so how did the “1BAT-D-Aniol Pa…” key name get created? Was it randomly created when creating the object? If so, is there a way to control what name it will have? Also, how would you go about creating sub-structures? If you can address the first question, I imagine it would be a matter of creating an object within an object etc.

K

---

<div class="post-metadata">

**Author:** ![aniolpages](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/aniolpages/32/62948_2.png) [@aniolpages](https://community.thunkable.com/u/aniolpages)\
**Post date:** [May 13, 2019, 8:36pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/9 "2019-05-13T20:36:32Z")

</div>

This name was created from another variable (this screenshot is from a functional app I made)

Here is another example:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9ded1fe4348863088dfcdef001aa269958a84264.png)

In Firebase:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f259970b9b38c9865d3665536344ef4e72b9ae7c.png)

Hope it helps!  
Aniol.

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 10, 2019, 4:42pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/10 "2019-07-10T16:42:52Z")

</div>

This helped but now when I try to upload new values it overwrites the old ones too

![Screenshot_2019-07-10%20Thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/d/1d183d6063c138a4ecd88b9f585affcd4b4fe393.png)

I’m using this to store directly a list to the cluoud variable, should I use something like add at the end of a list when saving new objects in the main tag?

---

<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, 12:12pm UTC](https://community.thunkable.com/t/cloud-variables-path-in-firebase-real-time-database/76210/11 "2024-11-08T12:12:16Z")

</div>


