Hi there,
Im new to programing. Im trying to do a simple quiz app. Im stuck on one problem:
I have an excel file with questions (over 450 questions), 1st column with no. of question, 2nd actual question, 3-6th ABCD answers, 7th correct answer, 8th explenation of answer.
So, I have a basic idea how to make it work, with one question - by adding data manually. Unfortunately, its not possible for over 400 questions.
How to upload a database with all of my questions, so I can call all of the columns for one row - based on a variable (first column, with question number).
Which MIT App inventor tool should I use?
Maybe I need an additional tool for database managment?
Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
Im sure there is a better way to do it, but I just cant figure it out. I think my way gets me stuck because of some limits for .csv or sings in a string. I don't know. Would be greatfull for some advice.
CSV files are only for dead storage and transport of data.
If you are working locally, you need to transform the dead csv text into lists and tables to allow use of list blocks like SELECT ITEM n FROM list.
Since you are using ';' as a column delimiter, and since you probably have extra commas imbedded in your cells, you will need to convert your text file contents into a table (list of lists) in two steps:
split the text at \n to get a list of text rows
loop through the list of text rows splitting that row at ';' to get a new list, adding the new list as an item to an empty list of lists (table.)
By the way, AI2 has no native SQL support (unless you want to invest in a SQL extension.)
P.S. Here is a sample project to do SQL-like SELECTs on a table (list of lists)
There must be something wrong with my .csv file, right?
Or maybe there is a character limit to a variable, so my "list from csv table tex" does not work?
I would rather make a local file, so there will be no need for internet connection. But now i think I have to go with google sheets.
Thank you. It works great...
but there is another problem. Some of the cells also have /n in them. I thought /r/n was a solution, but It seems it was causing a problem in the first place (with my fist blocks aka. "the walkaround").
Any ideas how to correct that?