Clear TinyDB Tag

Hello! Is there a way to enhance the function of this button:

I have a button that is when clicked, it will clear the list on the TinyDB Tag on it. But what happens is that, when I click the button, I need to go to a different screen then go back to where the button is in order to see that the TinyDB tag is cleared (because I can see the list elements in the list view)

so is there a way where I click the Clear Button, it will clear the tag and refresh the list view so that I do not need to go to another screen then go back again to see the changes.

After that ClearTag you can update the ListView.Elements. If what you are showing in that ListView is the content of prodList, which is now empty, you can set the ListView.Elements directly to

I have this on the Inventory Screen:

Then on the Home Screen, I have a list picker:

How can I call the tag/elements on the list from the List View on Inventory Screen to the List Picker on Home Screen

If you have the tags/elements stored in tinyDB, call to GetValue block for the tag you want and set the value to the ListPicker.Elements.

The data stored in tinyDB is available in all the screens of your app.

Hi again! I would like to ask how I can do it, wherein if the name of the product already exists, it should not add on the list so that I will not have 2 lists of products with the same name:



It seems you have a list with the items name so, you can check if the new product is already there:

If not, add to the lists.

Sorry, where should I put it?

Where you are adding a new element. Before to add it, check if the element already exist with those blocks.

It still works...


But if the element already exists, why are you adding it to the rest of the lists?

Or if what you want is to replace the old information with the new one, you can use the replace block:

So if the name already exist, its price, stock and the info stored in prodList is replaced.