Multiple choice quiz retrieving questions and answers from google sheets or csv

Hello everyone
I have made a simple quiz with 4 multiple choice answers and at the end, it shows how many points you got from correct answers ( at the moment I have only 4 questions as a sample BUT my aim is to have let's say 30 questions from each category. it will have 5 categories)
my question is how can I retrieve the question, the possible answers, and the correct answers.
I have made a sample sheet with columns: question, possible answers,

and correct answer

I am showing all my code in blocks and my designer which includes a listview, a label that shows the text of the question, a label that shows if you win (invisible at the start), a label that shows up with the score at the end of the game and a button Ok to go on.

Any help it will be appreciated. i have seen a lot of thing in the forum but i got confused

A Multiple Choice Quiz: How to work with the advanced features

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

See this video :wink:

Ignore the title, it covers getting all sheet content as well
(excuse the need to reload the companion, I only live streamed it earlier today)

Also:

Get a Single Cell from a Google Sheet

and

Use gviz to get and query google sheet data

as @TIMAI2 already mentioned, use the Google Visualization API to query your spreadsheet, see also
https://puravidaapps.com/spreadsheet.php#select

to get the questions:
select A

to get the answers (and let me suggst to have the correct answer always in column B, you do not need an additional column F with the correct answers...)
select B,C,D,E

Taifun

For more help you could watch today in Youtube

1 Like

And i think @TIMAI2 will also be available to answer any questions after or during his presentation.

The correct time is diplayed here
2021-02-07T11:05:00Z
Query a Google Sheet using Google Visualisation (gviz) and return results to App Inventor App by @TIMAI2
https://youtu.be/I_nRnsNSyQg

So for me it will start in 25 minutes already.

1 Like