How do you list view data to .csv and the some question?

Hello everyone,

I've been learning how to use App Inventor recently, and I'm trying to create an inventory app. My idea is to scan QR codes to retrieve the names of warehouse items, input the inventory count, and finally generate a CSV file. However, I'm encountering several issues and I'm not sure if there are hidden problems due to any misunderstandings I might have.

Once I have the item names and input quantities, I can display the data in two separate list views. However, I'm unable to delete both sets of data simultaneously, which forces me to handle them one by one. Additionally, I'm concerned about the process of exporting the file, as I'm unsure whether the file name is being correctly set based on the text in the text box and whether the file is being exported as a CSV file.

Lastly, I would like to ask how I can specify the export location for the file. Below is my AIA file. Please :smiling_face_with_tear:
The_First_Take1.aia (5.9 KB)

How many people would use this?

I got a chance to open your aia, and I see your TinyDB data is doomed to be wiped out every time you open the app.

You initialize variable list (awful name, doesn't say what it's a list of) to empty list on entry to Screen1.

You then try to do a csv text conversion the wrong way on that empty list to fill two global variables (whose names I can't read, but i can match by number and shape of letters.)

You then wipe out whatever you had stored in TinyDB under the tags materials and quantity.

I didn't bother reading further.

For your app, if it meant to be a serious app, use a spreadsheet or an online database, keyed by material name.

If you are just experimenting, use the material name as the TinyDB tag and the corresponding quantity as the value. If there are additional attributes like bar code numbers, add extra TinyDB Namespaces to map between the various attribute pairs (name of bar code, bar code of material name,...)

Do not store individual columns separately, as it will cause coordination problems as items are added and removed. Instead, if you keep tables, keep one material and its quantity as one row, adding rows as you add new materials.