So, I'm trying to remove an item in list tag "carts", but before removing it i want to save it first to the CheckOut tags. this how it read in tinydb ["Chicken.jpg", "Chicken", "100.00"]
But what do you have in "UserdData"? because the two ways to delete elements that you are using do not make sense....the first way you are removing always the first element of the list...the second way...I don't know what do you want to do...
Can you paste here the content of UserdData after to be read from tinyDB?
No. That is a screenshot of your app. Please, use Do it ( 'Do It' to view procedure results, event arguments and local variables (google.com)) and paste here the content of "UserdsData" (and the tag) after reading from tinyDB.
Do It Result: [["Chicken.jpg", "Chicken", "100.00"], ["Beengaling.jpg", "Bee", "100.00"], ["Butterfly.jpg", "Butterfly", "100.00"]]
Try this to remove an item (with the ProductName.Text) from UserdData:
you will need to store again UserdData in tinyDB.
It's not working at all, I don't know why but this should be delete that specific data that been selected by the user in tinydb then store that remove data in the other tinydb but that's not working
Use DO it to check the values of your lists, the tags and so on...
I know now what i did wrong lmao. I didn't save the changes that's why the value is keep coming back even it's already remove
I just encounter a problem with this, it's removing all the data in the tinydb not just the chicken, but all of the data save under those tags.
As you can see in my example above you have to remove from the list only the item. Once you have the new list (with the item removed), you need to store it again into tinyDB.
Again, use the Do it capability to check what is happening with your lists.
My bad. It's not removing all data, rather it's only removing that specific data but the problem is that when that data is remove the value of that index is now zero but my apps is trying to find a value to that index so it's not displaying the other content.
This is the error Message:
It seems you are trying to get the item 1 from an empty list...
Yes, but it's already empty since, It's was remove, Now I'm trying to do is when that data was remove it would be replace by the next data. so there's would be no error accur.
Hello, So I already resolve the problem with this one, but now the problem is, when I select all items in the list it supposedly removes all items in the list when i click buy, but it's not removing all items but it's displaying a error message.
So here for example: I have 9 items in my chart then select all of them
when it should be removing all item in the list intead this erro pop up
Then there would be 4 items in the list would stay instead of removing it on tinydb.
The error indicates that you are trying to remove the item 6 from a list with only 4 items.
Yes. That the error Im getting even when Im trying to remove is 9 items or all it would say that im trying to remove 6 items with the only items 4, but it's not it's 9
How are you removing those 9 items?
Here's the blocks:
It's working when im selected a 1, 2, 3, 4, or 5 items, but when removing all items or remove 6 items our of 9 list this message would pop up.
i can't use the if then, else if then, since it only removing 1 items even, I select 2 or more items.