Skip to first unread message

ShannonHartley

unread,
Aug 28, 2019, 11:50:39 PM8/28/19
to MIT App Inventor Forum
Good day! I started using App Inventor just last week. I wanted to create a very simple data recording app from scratch that fits the needs of our own business. (we have a land surveying business, I need to record the data we gather from every land survey we do)


I am stuck right now with updating the existing csv file. (I chose to use .csv because I needed to transfer the data to AutoCad)
1.PNG






















This is the Menu_screen, when New Project button is clicked, the next layout becomes visible. 
By clicking Save, it creates the .csv file. (/Project_Name.csv) with Project Name, Location, Date inside the .csv file.
 

2.PNG
When start traverse is clicked, this screen opens.This is where I am stuck right now. I want to update the existing .csv file with the data that will be entered in the fields available. I have used TinyDB and File storages in this project, but I don't have a very good grasp with it. heheThank you in advance for anyone that will help! :)

ShannonHartley

unread,
Aug 29, 2019, 3:07:35 AM8/29/19
to MIT App Inventor Forum
This is the .aia that I made so far.
Traverse_App (1).aia

TimAI2

unread,
Aug 29, 2019, 4:09:30 AM8/29/19
to MIT App Inventor Forum
What exactly is the issue ? I am guessing structure of your resultant csv file ?
It doesn't look like you are collecting a vast amount of data for each project ?
What would you like your csv file to look like (sample output) ?
Perhaps maintain a list as you add data, and when ready commit this to the csv file.
You can do this as you go along using the save file, which will overwrite what is already there,
or append each item as you go, providing a column of values (a list of lists) in your csv.


I also note you do not yet have any screen switching blocks in place ?


You could probably do all of this on one screen, using vertical/horizontal arrangements as virtual screens....
this would help reduce the need for use of tinydb to transfer data etc.

Use different screens wisely

If you decided to use different screens, then you should switch them correctly, else you will run out of memory after a while...      
The recommended method of switching screens in App Inventor
(Thanks Taifun)

Also see demo: multiscreen.aia

If you haven't done it already....


SteveJG

unread,
Aug 29, 2019, 8:57:11 AM8/29/19
to MIT App Inventor Forum
Several similar apps are posted  in the MIT Gallery by JBoudel.  These do a lot of what you are attempting Shannon.   One called Plant Cover,seems appropriate  as it is used with a TinyDB to record field data.   It might be helpful. I don't think it uses a csv file but if you collect into a TinyDB the data there can be exported as a csv.  Posting a screen image of your Blocks would help others to help you.  Tim mentioned several ideas.  Have you tried any of them?

Regards,
Steve

ABG

unread,
Sep 1, 2019, 5:59:04 PM9/1/19
to MIT App Inventor Forum
I see in your blocks for creation of a new project,
that you have hardwired some locations in blocks.

I am guessing your territory is the Phillipines?

I found a downloadable zipped 6 column csv table of 
location names with several levels of inclusion at

It has :
  region (column 6)
  province (column 5)
  city (column 4)
  name (column 2)
  unique id (column 1)

This file might fit into the Media folder
(maybe in pieces by region) and could be used
to populate your thee geographic selectors
as you home in on the locality.

You could use the filter techniques from
to dynamically populate each spinner based on the preceding
spinner selection,
to insure consistency.

Start by loading spinner 1 from DISTINCT of column 6.

ABG



Reply all
Reply to author
Forward
0 new messages