ColinTreeListView Extra Button + TinyDB

Hello friends,
I want colintreelistview extra button to delete the selected item from tinyDB
How can i get that done?
i have tried different block but didn’t work

Set the value to an empty string, then show only the ones that are not empty.

A block example will help pls
Just use a Button and TinyDB

I see you are making todo type app so better you save todos or item in list and save this list in tinydb by converting it to csv using list to csv block available in list section.
For deleting.
When extraButton clicked get selection id from colintree and delete this from todo list.(both starts from 1).
Same thi g could be done for update.
Always convert list to csv and vise versa when getting and saving to tinydb

use this, and also try to reload list (because for next item it maybe get index wrong so after these blocks clear and reload list as you loaded in start,

blocks - 2020-02-14T190129.908

The Element Deleted at First and when i restarted the App
It comes back to the App

Deleted successfully and when i restart app it restore back to the App again

Try setting a local variable to tinyDB list, then remove it from that list and restore it again (I think this will overwrite the first list with the updated one)

1 Like

yes as @bogelin347 said, store that list again in tinydb. with same name after deleting.

Not working

After deleting And restating the App All the Data that was deleted keep coming back

@bogelin347 & @ImranTariq The App is a Notepad and when delete an item and save another item or restart the App,The once i deleted comes back to the App

App screenshot after deleting and storing another item:

App inner Data that are stored:

Blocks that i have used & failed: