# Working with Realtime Db Nodes

**URL:** <https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957>\
**Category:** Questions about Thunkable X\
**Created:** [August 19, 2024, 4:34pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957 "2024-08-19T16:34:16Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 19, 2024, 4:34pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/1 "2024-08-19T16:34:17Z")

</div>

I’m working on a small project that involves using the Firebase realtime db. How can I automatically add a child “user id” with its properties (like “nickname”, “picture” and so on…) to the “users” root node (i.e. the cloud var) when the user creates his account?

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 19, 2024, 7:05pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/2 "2024-08-19T19:05:22Z")

</div>

You would need to use [dynamic variables](https://docs.thunkable.com/blocks/blocks/variables-overview/variables#h_f4365bf1bf). You can type in the name of the nodes where the “name” section is followed by a / to indicate going inside the node. For example, if you have a user node called “users” and child node named after the “user id”, the way to access the child node would be “users/user id”.

With dynamically creating a child, you would then do “users/” with a join block and the firebase uuid for example.

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 19, 2024, 7:18pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/3 "2024-08-19T19:18:20Z")

</div>

Can u show me and example, because I have already some something similar to ur suggestion buy it doesnt work.

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 19, 2024, 8:06pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/4 "2024-08-19T20:06:08Z")

</div>

One basic way to do something like that would be like this:

 ![Screenshot 2024-08-19 at 1.05.07 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/1/913c7aa65633ba9d33ce78f3fe5bf75ef7d06093.png)

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 19, 2024, 8:21pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/5 "2024-08-19T20:21:43Z")

</div>

Ok, thanks.

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 20, 2024, 9:05am UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/6 "2024-08-20T09:05:19Z")

</div>

And how i add child to UserID? and how i set a value to them. Like nickname

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 20, 2024, 5:21pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/7 "2024-08-20T17:21:41Z")

</div>

There are two ways to do that.

Similar to how I set the cloud variable, you would use a “set cloud variable” block and a “join” block. If you want a child inside the user id, the join block will have “users/”, user id, “/”, then the name of the child.

The second way would be to press the plus button on “create object” to add properties to your object.

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 21, 2024, 2:00pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/8 "2024-08-21T14:00:07Z")

</div>

And the next question: how can I update the child? for example if I want to change the user’s nickname. I created the object in the second way.

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 21, 2024, 5:57pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/9 "2024-08-21T17:57:52Z")

</div>

You can either override the entire child or you can use the [set property of object block](https://docs.thunkable.com/blocks/blocks/objects#set-property-of-object-to) to change one specific property of the child.

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 22, 2024, 9:04am UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/10 "2024-08-22T09:04:00Z")

</div>

This doesn’t seem to work, can you show me an example? We set ownership of a child users object/user ID, but it doesn’t change.

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 23, 2024, 6:04pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/11 "2024-08-23T18:04:04Z")

</div>

It would be a little difficult to show an example since it all depends on how you have it set up. If you take a screenshot of what you currently have, I can provide some insight into how to modify it to make it work.

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 23, 2024, 6:51pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/12 "2024-08-23T18:51:05Z")

</div>

Ok, this is a screenshot of the code parts with cloud var.

 ![OutSide - Thunkable - Google Chrome 23_08_2024 20_49_11](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/a/bae3632d67835dcbf11aaee9d37d875097b3daeb.png)

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 23, 2024, 6:52pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/13 "2024-08-23T18:52:47Z")

</div>

The yellow part is obviously a test, the set property does not work correctly, the get property does.

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 23, 2024, 7:04pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/14 "2024-08-23T19:04:48Z")

</div>

Try using the [dynamically named variables block](https://docs.thunkable.com/blocks/blocks/variables-overview/variables#h_f4365bf1bf), specifically the set one. Grab the dynamic set variable block and in the name, get a join block with the following: cloud variable users + “/” + app variable user ID + “/nick”. Then the value will be “Text\_Input1’s Text”. Give that a try.

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 24, 2024, 10:21am UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/16 "2024-08-24T10:21:54Z")

</div>

It didn’t work, here is the code.

 ![OutSide - Thunkable - Google Chrome 24_08_2024 12_21_09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/6/7618089a9021062e1444f58e7a5c01ddc8ddba31.png)  
The firebase database doesn’t receive the new value.

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 26, 2024, 6:56pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/17 "2024-08-26T18:56:19Z")

</div>

Could you send a screenshot of your cloud variables and expand each dropdown option?

I believe that cloud variables users is supposed to be something else, but need to double-check.

 ![Screenshot 2024-08-26 at 11.55.06 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/5/551698a16a96ee1a339570b2b175a7b538770f23.png)

---

<div class="post-metadata">

**Author:** ![tapionpad4x0](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@tapionpad4x0](https://community.thunkable.com/u/tapionpad4x0)\
**Post date:** [August 27, 2024, 1:27pm UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/18 "2024-08-27T13:27:01Z")

</div>

I already fixed it, thank u.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [November 28, 2024, 7:01am UTC](https://community.thunkable.com/t/working-with-realtime-db-nodes/3147957/20 "2024-11-28T07:01:04Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
