Problem trying to edit a key name and his value (dictionaries)?

Hi, I'm trying to save information in the app so I can consult and edit it either. I'm using dictionaries to create, like an example

Key: Register1, Value: A list of information given by the user using textboxes

Key: Register2, Value: …

This diccionarie is saved in a TinyDB for app purposes, so the structure is something like this:

TinyDB tag: Principal ID

Value: Dictionarie

Key 1: other ID to identify easily the information that is saved, value 1: the information

Key 2, value 2

I can access to the keys and values and use the information, but im trying to find a way to edit specific keys and values, because the key name is directly proportionated by the information given by the user (an ID, basically) so, if the user want to edit the information, I want to edit this ID/key too…

Im trying to use the “Remove entry” block but nothing happen. I tried fast in a blank app and the block worked, idk if it's an error of mine but I cannot found it myself. I can't understand why I can't remove the key/value if I can acces to the key, their value and show it in the listviews but not remove it, it's because the TinyBD maybe? How can I fix it?

The screen has a lot of code for other stuff like save the information offline and send it to a Google Sheets doc, so I`m sharing just the important part of the code



I can share the AIA, but seen the rest of the code works fine, I think i'm omitting some logic in the structure

When you remove an entry from dictionary shouldn't you also remove it from tinyDB?

1 Like


Well, I resolved it. I made a copy of the dictionary, edited it and replaced this copy in the original place. Here's the code.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.