Unable to recognize list inside TinyDB dictionary

I see you are trying to use consecutive numbers as your TinyDB tags.


You could have used the length of list of the TinyDB GetTags block, which does return a list.

However, the email address is usually the best tag to use, since they are unique to the users.

On the other hand, looking at the other data you are storing, this looks more like a table of student enrollments in various events.

Each row of the table would have columns

  • email address
  • name
  • password
  • event
  • chapter

Enrolling a student in an event would entail

  • Retrieving the tag 'ENROLLMENTS' value (initially empty list) into a local variable
  • adding a new row to the local variable
  • replacing the local variable back into TinyDB under that same tag.

This lets you use AI2's list blocks to sort and search the enrollments.

I notice you clear TinyDB. That erases all your data, right?

1 Like