How to import data from a sheet (googlo or airtable) to a localDB?

Hi, I’m new in the Thunkable community and a beginner! I speak english not very well so I apologize in advance for spelling errors and if I fall into an off topic… I’m building a quiz app for my students with many questions and I need to import the scores in a spreadsheet (google is better but airtable it’s also ok). Because I’m a beginner I need a tutorial but I don’t find it. So I made an app following a tutorial that make a quiz with a localDB and substitute the localDB with an Airtable spreadsheet. The app works but the question and answer text appears very slowly, making it unusable. So I think is better if I import data from esternal spreadsheet to a localDB opening the screen: is it possible? Wich blocks I have to use? Is it possible to do the opposite? Can I connect directly with a google sheet?
If it is possible I need a blocks example or a link to a tutorial! Can you help me? thanks a lot!!!

Do I understand correctly that everything works fast and well with Local DB? If this is the case, you can load all the data from AirTable to Local DB when you open the app. To do this, you will need to make a loop and fill in the cells in it. Instead, I would create a list of objects and work with it, not with Local DB.

To get data from AirTable, you can use the REST API, as shown on the scrAirTableQuery screen in the project https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/

I don’t know that you are running slow with AirTable, but you can choose Firebase with anonymous login as the base

How many questions do you have? In the free AirTable plan, you can create a total of 1,200 entries. This volume should work very quickly. Do you use a very slow Internet connection or slow blocks?

thanks ACTech for you Answer! I will study your link couse I’m a beginner and is the first time that I see many function…I work on a tutorial that using Localdb so I’ve used a spreadsheet of airtable like a local db and it works very slowly…under there is a link to a demo
https://x.thunkable.com/copy/af26eab4567cf66d1d87fccedacc5d17

my idea is to create an app very light that import quiz questions and answer from a esternal google sheet and let the students play then I can work on google sheet and I don’t have change the app

the demo have error so it doesn’t load images

is there a function that copies an entire sheet of airtable or google sheet to another sheet in localdb?

il progetto ha degli errori sulle immagini, che non riesce a caricare

Now I understand. You are using a slow algorithm. You need to do this: when you launch the app, download all the data from the database to the app once and then work with the data locally without using slow Data Source blocks.

ok!! can you share a screen of an example of blocks?

Now in the _list variable you have a list of objects from which you can easily take questions.

изображение

To get questions you need to do something like this:

This uses Any Components blocks that you need to know well. These blocks will help you get rid of a large number of duplicate blocks in your app.

thanks a lot actech! I will work on my project …if you don’t close this discussion I will share the screen of my blocks so as to help other beginners!

A last question: are scrair tablequery and airforquery variabiles? I’ve to initialize them?

A last question: are scrair tablequery and airforquery variabiles? I’ve to initialize them?

I’m sorry, but I didn’t understand your question.

Hi actech I’ve seen the app that you share but is very complicated so I don’t understand what are tablequery (airforquery is a screen!)…because I’m a beginner I need an explane step by step😅 but I don’t want to take your time so a take time to study😅 if I understand airforquery is an airtable sheet an I have to create a variabile: list and many variabiles for questions and answers…is it true?
Anycase thanks a lot for your patience!!

Okay, step one.

Do you have a table with questions in AirTable? What does it look like?

hi actech! this is my table of questions

thanks for your help!

Well. Step two.

You need to get all the data from the table as a list of objects in Thunkable. This block

изображение

I done this like the image upper but i write this blocks on a old project so i doesn’t work
https://x.thunkable.com/copy/18422d081a15acb24e89425c9db822ba
may I have to cancel all the old blocks?

See this Thunkable

In my project, did you get a screen like in the picture?

The oval shows all objects received from AirTable. Do you understand how to get them now?

Now you need to make sure that the questions fall on the right buttons. And now it will be done

I’ll show you everything

there is something that I don’t understand…
in the old project I use “get value from” and I can use row id and column to find the item, but I don’t find a similar block for this objects…is difficulto to explane…

Do you understand how this is done?

https://x.thunkable.com/projects/5f33aba4547fca47088efbbc/project/properties/designer/

It uses any Components blocks that you need to learn very well.

1 Like

Hi actech … i’m studying and trying and I begin to understand something … the next step i have to do but i can’t get is to connect the number of the answer button clicked with the number in the table that indicates the right answer (so I can change the color for the correct answer). .Could you give me an example of blocks? I’ll show you what I tried