Multiple Firebase components fail to do GetValue

Hello! I'm currently creating a small project that uses multiple Firebase components (29 to be exact). The block code is inefficient (I know). I just started coding with MIT App Inventor so I'm sure I'm doing something wrong--but sadly, I can't see it.

Here's what it's supposed to do:

  1. Get values from a Firebase Realtime Database. The project buckets are named after time (7:00, 8:30, 9:00, 10:30, etc.).
    Examples:
    image

image
and
image

  1. From each bucket, get a key-value pair (AName: "{random_name_here}"). Here are pictures of the contents within my database (The BName is basically there to represent another room. I'm assuming it will be irrelevant to this bug report).

image
and
image

  1. Print the value of AName within a Label component. Do this for all buckets (From 7:00 all the way to 21:00)

As you can see, it's not getting the AName of the other buckets (From 9:00 to 21:00) and is instead giving out an NA result which means no AName tag was detected. Here are further pictures of the Firebase component

Here is a picture of the blocks I am using. I'm guessing this must be horrifying to look at for more experienced developers but bear with me hahaha.

If anyone has any suggestions, corrections, or could point out where I went wrong, that would be much appreciated. Thank you for taking the time to read this!

Understatement of the year :slight_smile:

You only need 1 Firebase component. Set a projectBucket and store all your data under that.

Call back all the data in one go and parse the returned json to your list.

The use of colon separated "times", e.g. 09:30, may cause problems in firebase and your app. Suggest going military and using 0930, 1115, 2240 etc., although integers (e.g. 1115) may still cause problems... so perhaps a hyphen? Do not use 0,1,2,3 etc as tag names.

1 Like

I found the problem. It seems that the FirebaseURL seems to 'not save' even when I put it in. Before exporting the application as a .apk, I need to constantly save everytime I input a FirebaseURL so that it actually gets read by the compiler. Thanks for the headsup regarding the colon problem though. Appreciate it :smile:

Are you continuing with 29 firebase components ?

1 Like

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