Parse tinydb list and put into text box

Hello. I am just learning MAI .

I have stored some listview items with tinydb.

Now i want to put thoses items back the the text box so i can edit them.
I need some help on how to properly parse the items in the tinydb and put them back in the text box .

Right now i just get the whole list .

All so the row that gets retrieved and put back in the textbox needs to match the item that is clicked on in the list view.
here is project file.
FlatRate5.aia (147.0 KB)

Thanks for any help.

Don't store ListView Elements in TinyDB.

They are hard to reconstruct as their primary ingredients, like turning apple pie back into apples, flour, and butter.

Instead, keep a list of dictionaries under your TinyDB tag, and generate a parallel list of Elements from it for use in a ListView. Use the SelectionIndex as the index into the list of dictionaries to get access to the selected dictionary with the keys,values you want to show in your Labels.

Thanks for your reply.
I will look at dictionary :slight_smile: