Deleting indexed items from TinyDB

I am building an app which stores a list of journeys.
I have included a delete function but I can't get it to delete the first item, or other items if an item in between them is deleted?

I do not see you removing an item from the list anywhere.....

The list is generated from the database every time show journeys is called, so I have removed the entry from the database then called the function to generate the list again

If I were for example to add:

idx distance. mode

  1.     10.               bus
    

2 5. train
3 7 bus
4 12 motor

Then I can delete 4 then 3 then 2 but not 1.
But if I delete 2 first then I can't delete 3 or 4 after

If you have designed blocks properly , you can easily del.. no matter wherever the items

1 Like

You may want to try like this example project

tdbJourneys.aia (3.0 KB)

Use the list indexes, without the need to include them in the list of lists.

You are trying to delete from TinyDB by setting values empty.
That does not remove the tag from the TinyDB's Taglists:
Screenshot 2023-05-06 195346

If you want to delete something from TinyDB, use the TinyDB Clear Tag block.