How to create child nodes?

Hello good day. I stopped working with the app inventor. I am now working with thunkable. Now I have a question. working on firebase. When I press the button, I add a school. I want to get teachers and students under this section.

Adsız1

I think this is okay. Would you recommend another method?

Slightly better (or at least simpler) might be to use Cloud variables, which use Firebase, so you could use something like:

Screen Shot 2019-12-12 at 1.45.05 PM

The full 'create object' would be the same as in your 'Realime_DB1 call Save' example.

Hope this helps.

-Mark

1 Like

thank you very much

I want a structure like the following on the firebase. but I can’t use a variable with create object. I’d appreciate it if you helped. Thank you

school name 1
Teachers
teacher no 1

  • name
    -age

teacher no 2
-name
-age

students
students number 1
-name
-age

student number 2
-name
-age

school name 2
Teachers
teacher no 1

  • name
    -age

teacher number 2
-name
-age

students
student # 1
-name
-age

student number 2
-name
-age

Hi,

One of the options

{
“schools”: [
{
“name”: “”,
“teachers”: [
{
“name”: “”,
“age”: “”
},
{
“name”: “”,
“age”: “”
}
],
“students”: [
{
“name”: “”,
“age”: “”
},
{
“name”: “”,
“age”: “”
}
]
},
{
“name”: “”,
“teachers”: [
{
“name”: “”,
“age”: “”
},
{
“name”: “”,
“age”: “”
}
],
“students”: [
{
“name”: “”,
“age”: “”
},
{
“name”: “”,
“age”: “”
}
]
}
]
}

1 Like

I would like to add the teacher numbers with the variable at the bottom of the example.

I showed you an example. You can add as many fields to it as you need.

Can you explain in some more detail why you say that you can’t use a variable with create object?

-Mark

I did what I wanted. Thank you very much.