Hello everyone. I've been struggling with lists in TinyDb. I'm inserting a list of 7 elements into TinyDb (year, month, day, place, floor, material, meters). How could I add those meters in function of month for example.
TNK u in advance. PLs help.
It sounds like you are describing data that would normally kept in a 7 column spreadsheet.
AI2 has a spreadsheet component:
To keep that data in TinyDB you would need to worry about how much data you would accumulate over time.
The simplest way is to start with a fixed tag 'MyAppData' for example, initially an empty list. Add a row (list) for every new 7 item addition. That's a list of lists (a table).
After adding every row, save the table back into TinyDB under that same tag.
Before adding new data, get a fresh copy of the table from TinyDB, then immediately save the entire table back into TinyDB.
There are advanced list blocks you can use to filter the table by year and month.
Sorry, I do not understand. Please elaborate.
And:
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by
Taifun.