Modify data in RealtimeDB

Hey, as if I get many users on my app it will fast become a mess. I so need to make sublists on Firebase. After playing a bit with json and else, I succeeded in creating the following :

image
Which gives : image

But my question now is : How do I get to modify the sublist items ?

Could you please directly share the blocks I need ? Here is the demo project :

https://x.thunkable.com/projects/5baa9bb71149e023913113fe/Screen1/blocks

Thanks !

Hey @Mark ! I think this block is the solution I’m searching for image but sadly when I try to insert it it shows me this image

Is this a known issue ? And if yes, do you know any workarounds ? Thank you !

Hello my friend,

try to drag it first to the blank screen so it gets gray.

After this put a text blocks to the “of object” and “to”

Then insert it at the place you want

1 Like

and be aware that this component only functions if you use a “old” variable from a purple function component!

…this bug :space_invader: followed me the whole weekend :crazy_face:

Salut,
John

1 Like

This works !

I am only using these variables at the moment :slight_smile:

Do you have a quick answer for this one please ? :slight_smile:

I know I’ve read yor posts hahaha :joy: ! Hope it’s fine now

Tried this :

if it might help :slight_smile:

give me a few moments to think…

1 Like

Unfortunely, I cannot open your demo project

But to answer your question:

Save to firebase…
key = AcrobatEpee/2
value= “8”

this should change the second list item to a 8

1 Like

The “get object from JSON” makes here no sense - sorry :slight_smile:

1 Like

I am totally new to objects, what should I put instead ? A simple textblock won’t plug

… I want to give you an idea, which textstrings are allowed in this context above:

make object from JSON…

{}
{“name”:“AcrobatEpee”}
{“name”:“AcrobatEpee”,“age”:99} :stuck_out_tongue:
{[“apple”,“banana”,“pear”]}

1 Like

I don’t get the idea I’m sorry I’m totally new to this. You’re telling me to recreate the list everytime with the create object block ?

First, I tell you that “root/test” is definitely not a JSON and because of that you cannot use the get-object-from-JSON block here.

“{}” is an empty object.
Please create objects with the rosa components and then use the get-JSON-from-object blocks and look at the output (maybe assign these blocks to a label. then you will learn it and understand

1 Like

understanding OBJECTS once really took four weeks for me :smirk: … and now I think I was dumb, because it is a really easy issue and not very complicated

1 Like

Some friend of mine explained it to me like this:

Everything you know on our planet is an object :hushed:

For example a red apple :apple::

{
“apple”:
{
“color”:“red”
}
}

2 Likes

I succeeded in creating an entry in Firebase with the blocks : image

I do not get how to make any other operation. Would you mind showing me a bit of blocks telling me how to access the item mdr I created here ? From that I will learn alone and stop bothering you hahaha

Thanks ! :slight_smile:

…or a 12 years old grey rabbit :rabbit2:

{“rabbit”:{“age”:12,“color”:“grey”}}

1 Like

in Realtime_DB1 call Get
key = root/test

… the output will be “mdr”

1 Like

image

Output is undefined :confused:

UPDATE : Now the output is showing like a miracle :confused:

Hey @User81 ! After all this I think blocks would be the greatest option or even a simple project if you have a bit of time, I’ll share the final result when I’ll find it. Thanks ! :slight_smile:

I generally recomment to NOT use the rose blocks with the realtime DB. instead use

in Realtime_DB1 call Save
key= “root/test”
value = “mdr”

1 Like