Overwriting data in Firebase

Good day, Can someone tell me what more can be added to my blocks so I can add more data to firebase?
Currently, it keeps updating the same position instead of adding more entries.

Also, any guide on how to delete data from firebase?

Screenshot 2022-04-28 at 7.33.49 PM

I suggest using this data structure on the Firebase side:

  • meds
    • aspirin : true
    • Lipitor : true
    • metoprolol : true

so you could retrieve a list of med names by setting your bucket to meds and
requesting a taglist (meds/aspirin, meds/Lipitor, meds/metoprolol) and extracting the last item from splitting each tag at /

This organization allows you to add/remove meds individually.

Firebase.StoreValue("meds/PreparationH", true)
Firebase.ClearValue("meds/aspirin")

http://code.appinventor.mit.edu/reference/components/experimental.html#FirebaseDB

Can you explain further please?

I apologize for the recommendation to change buckets in Firebase. I had forgotten that you can't do that in Firebase, only in CloudDB.

I re-editted the first post.

P.S. Instead of using true/false as the value of each med, you could use HHmm time of day to take the medicine, or a list (HHmm1, HHmm2,...) of times of day to take that med.

I don't think I'm following, do you mean to add another text tag and put "/" ?
Screenshot 2022-04-29 at 12.01.24 PM

I have tried it and it works! Thank you.

Is there any advice on what block to use to delete one entry from the database? It deletes from the app currently but value still stored in firebase.

I experimented with clear tag but it clears the entire database instead of the one chosen on the app

Build your tag for the clear operation using the same JOIN that I used in my sample.

It clears the entire database and not just the one I select

Screenshot 2022-04-29 at 5.37.50 PM