Get Tag from Firebase with dynamic list

Hello, I have a problem...
I would like to save under certain tags in Firebase. That also works very well.
For this I would like to call up the tags that have already been saved and add up the number 1 and so on. If, for example, the tag: Event1 exists, the next tag: Event2 should be saved. As soon as the tag: Event23 exists, it should be saved from tag: Event24.

In other words, AppInventor should understand that this tag has been saved and then add the number 1 in the next step.

It works with these blocks. But as soon as I restart the emulator, the storage starts from the beginning and overwrites the older tag.

1 Like

Is this block not work

Welcome to the community. Use tinydb to store global beides otherwise every time your app starts global variable is set to 0.
An simple example



Hi @_sinem58 welcome to our community!

TinyDB is pretty good but the problem is, that TinyDB can only store variable id locally :confused:

@_sinem58 I believe this is a very effective way for you



Unfortunately, no. After I close the application or change the screen, the counter starts over and rewrites the tag if this is identical to the new tag. But I want several of the same tags (with the same name/information) and therefore different numbers.

Many thanks for the answer. I had tried something similar with TinyDB and it hadn't worked. Will try that out.

1 Like

So do like @Salman_Dev, @dora_paz tell you to do

Thanks for this approach. Will try it out. Looks promising



Of your 5 fields, the first two fields can be JOINed for a tag, and the third through fifth fields can be packaged as a sublist (row) to be added as an item of the list stored under that tag.

You would be using FireBaseDB to keep a 3 column table under each tag.

I am assuming you will not need to go updating individual rows in each table, only adding new ones. Otherwise, you would have to replace the entire table for each update, which is tricky.