How do I set unique tags in firebase?

I am creating an app where donors can post any extra food/supplies they have and people in need can get it. Every time a donor posts the food/supplies, it is displayed on another screen for people in need to look at. My problem is that I want the donors to create different posts for people in need to look at. I saved the values in firebase under a word, but every time a donor would post, it would override the previous one. I started saving the values under the time they posted, and it would show up fine in the firebase but I was unable to show them in the list because I did not have a way to get the tags and display all of the values in the list. Does anyone know how I can save the values under unique tags and display it in the list? My code is down bellow.

Here is a Firebase block that will come in handy for multiple simultaneous append to list:

AppendValue( tag , valueToAdd )

Append a value to the end of a list atomically. If two devices use this function simultaneously, both will be appended and no data lost.

Use the tag yyyymmdd to hold a list of all the posts for date mm/dd/yyyy.

I recommend this tag format because it is in time order, and it helps you request all posts in a date range. (You have to ask for each date individually. The Clock component's blocks can help you with that.)

This is also handy for cleanup time, when you want to delete all the posts by date range (albeit one day at a time.)

Thank you! I ended up indexing the data and saving it in a list.

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