Need help regarding Firebase

Apologies, perhaps this one would work?
image

Still, nothing shows up

Assuming no error, then you need an else clause in that if/then tag test, to direct unexpected incoming values into another Label (a catch-all).

That log sequence I posted earlier (draggable) would work.

image

So ive gone ahead and did the same thing, as u mentioned above, and the results that im getting are exaclty:

"BiologyExam:"

image
its not showing the "On 5/3/23" part
And the test tag isnt showing up too

It's good that you got the tag back.

That means it's time to pay attention to the values.

The AI2 block that posts to Firebase adds extra markup to wrap problematic symbols like '/' that interfere with reception and decoding incoming values.

Add a section to your app to store new (and old) tags/value pairs from TextBoxes, and see if the new tags/values work.

image
I know this isnt something you've asked, but i tried getting a better layout on it, to see if it had a possibility of the text showing up, but hidden.
Apparently thats not the case, and now reading what you've said, i do not know how would i save the tags value, since like it shows on the code, that even pressing the button multiple times, im only getting the tag's name as a value, and its only one, therefore its not reading the other tags. I do not know how to solve this.

The path to a solution lies only through in-app updating of Firebase.

Another possibility:

Your .GetValue block asked that " " be returned if nothing was found.

Indeed, the value " " was returned for that tag.

What could cause Firebase to return (not found) for a tag request?

Maybe the ProjectBucket in that AI2 component was looking in the wrong place in the Firebase data tree?

Well, if it was looking at the wrong place, i wouldnt even get "BiologyExam" as a value being returned, so i dont know about that possibility

Here's an experiment for you to try:

Request tag='ABGnotThere' with default ' ', and tell us what you got back.
(I assume that tag is not in your DB)

You want a tag that returns ' '? how would i define if it actually returned ' '?

Or ask for a default value 'notfound', which you can test for.

ive done smth like this, and discovered that i cant get the value, only they key
image

it shows:
BiologyExam
NotFound

Be sure that whatever you have in the ProjectBucket in Ai2 appears in the Firebase data tree along the branch from the root to your tag.

image

it should be all set

I don't see a bucket to the left, and you haven't shown the properties of your Firebase component.


?

These are top level nodes (tags)

then what should i be doing? im new to this whole database, apologies for it

Come back when you have done one of the tutorials in

Like this:

I have used a top level node (tag) called Events. This is set as the ProjectBucket in the designer. Use the two textboxes and the submit button to add a tag/value to firebase. Use Get Tags and Select to return all the tags under the project bucket Events, then select one from the listpicker to display the tag and the value.

SCREEN

image

DESIGNER

image

BLOCKS

FIREBASE CONSOLE

image

If you add data in the firebase console, then you need to surround your value with double quotes, and use String as the data type. Firebase will surround your string with another set of double quotes. This is needed for the firebase component (not if you use the web component). You do not need to add double quotes to your value if adding an item using the firebase component in the app.

It is assumed that your firebase rules for the project bucket Events are set to read: true / write:true

2 Likes