Please help me with the firebase connection

I want to connect a firebase to my project. Its a list of food that include Title, Image and Detail. After i followed the tutorial, I just test it to random a food Title. But it say that there are nothing in the list. Did I do anything wrong? Thank you!

Here are my block and database:


Check what you get in the value variable. Display raw data e.g. in a label.

Ok Sir, Im tried it. When im hit the button dislike, it will set Label1 to a random item on list "global Title". But it said "Pick a random item: Pick a random item on an empty list" What does this mean?

When you are requesting for tag, the response you get in a list with the tags, that means Food1, Food2, Food3:

You can get the value of each item in that list and in GotValue block, make the lists.You will get for each one the 'Detail', 'Image' and 'Title' fields.

1 Like

The list isn't being populated; that means the if condition in the FirebaseDB1.GetValue event isn't being satisfied.


This is not the best way to do things

leave your project bucket as List

and get your items:

tag: join: Food & number / Title
tag: join: Food & number / Image
tag: join: Food & number / Detail
1 Like

well I was supposing the projectbucket like 'List'...I didn't see that project bucket.

anyway, I agree that your method is more direct, but mine would also work, right?

Sorry Sir, Im really new to the app inventor and firebase. Is this what you mean?
Screenshot 2024-02-29 231727

set the projectBucket to 'List'

I following your step sir, but unfortunately it doesn't work. Did im do something wrong?

Get the value for the tags:

1 Like

Thanks for your help sir, but it still said that it is an empty list. What should i do?

First, move this to Initilize block,

before the call to get Tags. Then check in "TagList" block, if you are receiving in 'value' a list with "Food1, Food2, Food2".

If that is correct, then check in GotValue, in 'value' parameter, what are you receiving.

Sir, How to check in "TagList"? Thank you.

use a label to set it to value and be able to check it...something similar to this:

Sir, In TagList i got ["Food2","Food3","Food1"] and in GotValue i got "asd".

that's right...the problem maybe is that your tags now are not "Title", but "Food1/Title"

Sir, it worked. But it only worked when im write the tags as "Food1/Title" , "Food2/Title" . Does there anyway that im can store the tag as Food/Title so i don't have to specific it for every item in list?

you can use this less restrictive condition:


which will met for the three title tags.

May I suggest a more workable tag/value structure?

  • list
    • ostrich_eggs
      • Title:"Ostrich Eggs"
      • Image:"ostrichEggs.jpg"
      • Detail:"Only available in Australia"
    • rat_milk
      • Title:"Rat Milk"
      • Image:"PizzaRat.png"
      • Detail:"Only available in NYC Subway stations"