I have a list of chemicals and their corresponding storage locations and they are a lot of chemicals in the list.
I want when a user opens the app, he should have an option to select a chemical name from the list and when a chemical is selected its storage location appears on a label in the app. This way user can go to the location to retrieve the chemical.
The app should be capable of adding new chemicals and their location in app database (local app database). And if a location of any chemical changes their should be an option to update the location of the chemical too.
Here is a quick and lazy way to do this in TinyDB:
Store your chemicals, locations, and quantities as follows:
tag=JOIN(chemicalName,'@',locationName)
value=quantity of chemicalname at location locationName
Use the new filter list block on a TinyDB.TagList to filter for tags containing
JOIN(chemicalName,'@') to get tags containing chemicalName.
Loop over that tag list to extract quantities and locations for formatting in a ListView.