How to filter Airtable data to local DB to display in Data Viewer?

I’m trying to filter some data from an airtable to a local DB in my app

The image below shows how i filter the data

  1. I search for users with an ID and if “status” is = to “Asked”
  2. then i have 5 variables that store the lists of any of the found users from 1.)
  3. then I’m trying to get the properties of the objects of the user and store them into there designated variable ← I feel like there’s an easier way to get the objects… is there a better way to go about this?)

The image below shows how I’m trying to add all the filtered data to the local database in the app:

Screenshot 2021-02-19 232916

However right now I get a screen that looks like this:

I tried to see what the data was filtering to by setting the list “Homework Help Request–” to a label’s text but I just got [object, Object] and i’m not sure if that’s where I’m messing up? Is this possible to do? If you’ve done something similar to what I’m trying to do I would appreciate it if you could share any advice or tips!

I know how to filter Airtable data with a list and listviewer but in this case I really need to have the filtered data be displayed in a dataviewer.

thanks for reading all the way down here if you did! And thanks in advance to those who leave responses!

Edit:

Here’s the link to the airtable if you’d like to get a closer look!

3 Likes

Please see my example to achieve the same

https://x.thunkable.com/projectPage/5fb9fb1dbfeb240011084d78

This is built on Local Storage but the sample principle applies for Airtable.

3 Likes

Thanks a lot, @muneer!

This is a perfect solution - I was trying to find a solution myself but it didn’t work out… And when I saw your project & tried it, it worked like a charm!

btw I am using a Google Sheet as my data source & I can confirm this solution works for it as well :+1:

Hi Muner,
I am trying to find examples of how to pass data from airtable or Google sheets to a local database, to be able to use the “is_used” thing and other tricks that I have been learning with you, and I have found that you had this example, where you say that “This is built on Local Storage but the sample principle applies for Airtable”. I have been studying it and I don’t know which of the bases would be that of google sheets, if “itemList” or “selectedCat”, or “categoryList”… As you can see I’m a mess… And Every time I have tried to learn with a real example, I have found this sign indicating that I am late
error Could you please help me with this too? Thanks

1 Like

I’m able to open the link shared here:

Is it possible you are at your limit for the number of projects in your account?

1 Like

Hello Tatiang. Yes, I have been looking at this example, but I’m sorry: I don’t know how to apply this example about how to pass data from airtable or Google sheets to a local database;

I apologize if there’s more to this conversation than just in this topic but… you can do a lot with Airtable filtering with the API. What sorts of things are you needing the local database for? Do you have offline needs for your users?

Hi Tatian.
I am trying to figure out how to pass data from airtable or google sheets to a local database so I can
make these data, already local, feed a Data Viewer List, which allows me to know which was the last row used in the previous session to be able to continue from there. (Each file has more than a thousand rows and I can’t start each session from row 1

Hi Tatiang and Thunkers.
Sorry I wrote your name incorrectly the last time.
I’ve been reading and you asked almost the very same thing I’m asking now: take data from google sheets to a local database so I can
make these data, already local, feed a Data Viewer List.


I don’t know if the different sollutions you got were good for you, because I cannot accede because they have been deleted
error
I think it should be a great idea if the thunkable team placed a step by step guide of these very commonly asked questions affecting many users.
Besides, I’m having trouble accessing blocks of type in … call …
AIRTABLE TO lOCAL dba2b
or call …'s …
AIRTABLE TO lOCAL dba2
although in my Data sources I have Google Sheets and Airtable files…
AIRTABLE TO lOCAL dba3b

Could anyone help me with these (as I have been reading, they have been happening beforfe…)
Thanks

@similar2similar I didn’t see your posts because you didn’t use the notification symbol. To notify me, include @tatiang in your post. I believe you can also click Reply on a post of mine instead of the Reply button at the bottom of the topic in order to notify me of a new post.

You mention that you’ve been having problems but didn’t provide details. Share a screenshot of your blocks or a link to your project so we can see how you have everything set up. It’s not clear what you’ve tried or what happens when you preview the project, nor what you expect to happen.

@tatiang When I try to mimic some project, I find that I don’t have to choose some blocks that I see in other projects, like the ones I have shown before… why does this happen?
Besides… did you find how to solve what I asked you?

1 Like

The Data Sources blocks are different in the Drag and Drop interface. You can use the List of Values block to get column data:

There is also a Create Row block there.

1 Like

In the StP UI, you can access the tables in two different ways, you can use the component of the database (Airtable, Google sheet) from the component view where you will have certain blocks.

In the other hand, you can access the same tables using the Data Sources option which will show slightly different blocks.

Another distinctive aspect is that if you access your tables using the component block, you will not be able to link them with the Data Viewer List.

Hi Muneer.
I have noticed I changed your name the last time too, so, sorry for that.
Well I have told you both I’m working with I have developed my work with local DBs, but for security reasons they recommend to do it with files from the cloud: airtable or Google sheet, which is my choice because it supports many more rows per file. So everything worked fine: they had even sound, pronouncing words in British and American English and in Spanish using the thunkable DVLs… but I had no control over the DVLs and they always started with the first word… Muneer tried to teach me with an example, which I don’t know if I understood correctly. Now I’m trying to adapt it by converting two of the buttons into the DVL swipe ones… I don’t know if they will work


But tha main thing, rigt now is How to get the data from the cloud to make it local, and be able to aply the “is_used” colum and some other changes… And them, I cannot find any examples with blocks in my UI, so what would you do, stay with the old Thunkable, or change to the new one?
I use the Data Sources option, but I don´t understand the differences as slightly, because I’m never so sure of what I do…

if I see a CALL… or an IN… what do they correspond to?

1 Like

I have also been reading a lot about JSON , like this


If the information persist, this could be a great thing, isn’t it?

1 Like

As I said, if you need to get the column data such as from a “in Spreadsheet1 call GetColumn” block use the “list of values” block instead. Both of those blocks do the same thing… they get the data from a column and return it as a list. The “list of values” block is also shown in the documentation.

I’m not sure what your question about JSON is. You can definitely store JSON in a stored variable that saves to the mobile device. Or you can use Firebase to store JSON data in the cloud.

1 Like

My question about Json is if it may replace the need of downloading from the cloud and creating local data files and so on, and how could I have control over the words that users practice, so they don’t always have to start with number 1, and restart new sessions where they left them

1 Like

@tatiang, @muneer

Hi, Tatiang, You said

"As I said, if you need to get the column data such as from a “in Spreadsheet1 call GetColumn” block use the “list of values” block instead. Both of those blocks do the same thing… they get the data from a column and return it as a list. …

I’m just a beginner, but if I think at least we, beginners, need to have a table with a clear correspondence between the blocks that we can see from examples, and the ones that we can actually use in our UI. It is very unpleasant when you have to find out what each block refers to, and you cannot be really sure of it. So I think the Thunkable team need to updated the examples to the current blocks, or to make a clear equivalence table between them.

Tatiang, that equivalence you are talking about “in Spreadsheet1 call GetColumn ” block use the “list of values” block” will be real , I don’t doubt it, but for me it doesn’t help at all that they have “different hooks”

in spreadsheet

list of values

Thus it is quite difficult to try to have reference models, and the available examples cease to be of much help.
Anyway, as you ask me to show you, this is what I’m trying to do, and when it is done, pass it to a Data Viewer List:

I’m just asking the very same questions for a long time: Could you show me some blocks with the solution I ask for?
Thank you.

1 Like

I know you’ve asked several times for this. What you’re asking for is complex. Keep in mind that @muneer and I are just users like you, volunteering our time to help out. We may or may not have time on a given day to go really in depth into an answer.

The in Spreadsheet1 call GetColumn block returns a green column block that is in a list format. That column block can be connected to any of the blocks in the List drawer. The list of values returns a list format and can also be connected to any of the blocks in the List drawer. Think of the list of values block as a shortcut. It’s a single block that does everything the older block did.

The list of values block will only get one columns’ worth of data. So if you only need one or two columns, this can be pretty useful. If you need the entire spreadsheet (all columns), you’ll probably prefer a different method as I discuss below…

I’m doing the same thing for a project I’m working on. I store the data in Airtable and since I’m using the Snap to Place interface, I use the GetAllRows block. But if I were using the Drag and Drop interface, I would use this block:

image

I would put it in a loop like this:

Note that in my testing, this process is slow to load the data in the Data Viewer List. 48 rows of 12 columns took about 4 seconds to display.

1 Like