How do you create several tags in firebase with multiple elements?

i need help for my project. How do you create tags that increment themselves?
I am creating a business app where users can add their items to sell. but I don't know how to create multiple tags with several elements in each tag (e.g., item name, price, picture, etc.). please help!!!here's my block pictures



mcproject1 (3).aia (3.1 MB)

Price numbers only is not the price value.

It is the switch that restricts values to numbers, true or false.

Use price.text

There is more to fix, but not now for me.

ooh ok thanks but sure i really need help right now hahaha

If you want to store data in firebase in a tree structure you can do something like this with the Firebase component:

food
-- category: dairy
-- name: Milk
-- price: 1.37
-- image: milk.jpg
-- link: https://shop.com/Daiary/Milk

You can then call back or update an individual element of the "food" e.g. the price:

image

without having to send any of the other elements

1 Like

but how do i make it so that it looks like this
food1("item name","price","image","whatsapp link")
food2("item name","price","image","whatsapp link")
and so on, so that i can retrieve each food later to display it on another screen


and btw category wont be stored in array..it is to classify each item entered. For example, if the user chose category Used Item, then the database would be usedItem("item name","price","image","whatsapp link")

In my example, just change food to food1, food2 etc while you add a different item.

You can then use the getTagList to return a list of "foods" to select from, then you can return this tag's data as a json.

then how to make it to food1, food2 when adding item on its own?i mean im not the one who sets it?like it increments on its own​:sob::sob:im sorry for the requests but im really stuck on this

You could do something like this:

okay i will try it soon and let you know if it works🤞. Thank you

hi so i kind of changed the blocks to this


so that it would store these values in firebase

but now the problem is i don't know how to retrieve the values in another screen

in screen food_desc it would retrieve an item, for example Ramen and display its price, block and link.
please help😭

hello. My team and I would like some help. It is better if we can exchange phone number so that it will be easier to communicate. Please note that my project due date is around the corner. Please help thank you!

I have already shown you how to do this above

Here an example using the web component:

what is "Obfuscated Text"??

image

thank you

Hi. So I succeeded in adding items to the firebase. But I have another problem. That is to display the tag and values. So how my app will work is the user will add one or more items, and that item will be displayed in another screen. So in screen1 is for the user to add the item. then in screen2 is to display all the items that were added. So basically, in screen2 it will show the items that have been added by users. So maybe it can be in a list that shows the items' name, block, price, phone number. And when the user adds an item at screen1, screen2 will automatically add the item to the list. This is my database: oh replace link to phone number

Expected display:
Item Name
Price: "price"
Block: "block"
Phone Number: "phone_num"

Item2 Name
Price: "price"
Block: "block"
Phone Number: "phone_num"

and so on..

All items under category, or just food items or others items or used_item items ?

each category will have its own screen. So the items under category food will be displayed on screen food, category used_items will be displayed on screen other_item, and so on.

But do you want to fetch the entire dataset - all categories, or just one at a time ?

all items in the categories. And fyi the users can add more items.