How do I work with lists and tinydb? (based on @TimAi2 tutorial)

Hi TIMAI2,

Thanks for taking the time create this little exercise, I have followed this though with no issues. I have attempted to transition these principles into my own app but I have run into some errors.

I already have the “save” function if it were but my data isn’t a single word, more a combination of fields. In an attempt to reconstruct this, on delete it actually creates a row rather deleting, could you offer idea where I could be going wrong?

blocks (36)




Many Thanks

You never set the tinydb tag "collected" to variable list "global assets" in Asset_viewOpen ? This assumes that global assets has the same list structure as whatever it is you do with the contents of tag "collected" (which you also reverse ?)

Global variable is set on screen initialize, is that perhaps wrong?

I'm lost now

Going to split this off to a separate help topic....

I think you will find this safer and more stable than your makelistview procedure

It is important not to scramble your input while working on it.

P.S. I did not address the issue of what to do if any of your rows has less than 30 columns in it.

In my tutorial, I set the list stored in tinydb to the variable list I am going to work with (animals), any changes made to the list animals are saved back to the tinydb as a list. Your blocks do not show you loading the list Assets with the contents of the tinydb.

Thanks ABG, I have rebuilt on your recommendation and seems to be working as it was albeit more efficiently. :+1:

mystery solved :wink:

@TIMAI2 You can close this