How to query a Database (Airtable) in Thunkable X?

Hi there,

I’m trying to create a simple dictionary app that will search a column of an airtable database for a user-entered string, and if it a match exists, then display the definition I’ve written (which is stored in another column of the same table). I think this is a pretty simple query, but I can’t find any blocks in the airtable section that seem to deal with queries directly.

I tried to get a SQLite extension (which seems to have querying built in), but I just found out I can’t use extensions with Thunkable X.

So then I think I need to write the query manually, but I don’t know how to do this. Do I need to dump the data from that column in airtable into a variable or list, then search the list somehow? Or can I query the airtable directly? If so, which blocks do I use?

I’m new to this, obviously. Thanks to anyone who has time to spare to help!

1 Like

OK update…

Here’s what I’ve done:

I’m asking the user to enter a string.
Then I’m asking the AirTable to put one of its columns into a list. Then I’m checking the list for a match with the user-entered string. If I get a match, I want to output the item index from the list (which should be the same as the row number). Then I want to take that row number and look up another column from the same row and display the text in it. This seems really simple, but I’m getting muddled with all of these drawers and functions.

Am I just missing something here- is Airtable not designed to be queried like this?

Please help.

1 Like

OK Update again… maybe this is just for me as I solve my own problems!

I just figured out how to get the index for the row by doing it as a listpicker instead of a search for comparing, then making a JSON object out of the correct row! Cool!

HOWEVER, I would still like to find a way to implement user search. Is there any way to pull the index (row number) out of a given column as a variable, if it’s not a ListPicker function?

1 Like

Hi, could you share your screen blocks how you solve it? I will have to solve almost same situation. Thanks! J.

I pulled the index out as the row number, so that worked to get the data.

However, now I have another problem. On the next screen get data from the user and put it in a different Local_Storage, and then calculate something for display on the final screen. But the old data gets overwritten by the new! Weird. Can’t seem to find a way to store multiple variables in Local Storage…

1 Like

Thank you very much for response! I will try your setup tomorrow. Anyway im not sure that i can help you, because im not experience yet :-/

Are you closer? :slight_smile:

Im trying do something similar, but im still on the beginnig because im looking for basic VLOOKUP function. Could you please write (or show) how to create data based on one value?

For example i have table with data:
obrazek

And i want to show login user (in ListViewer as textitems) only data as are in the same row as login user (i know how to use LocalStorage and userid). But i dont know how to extract JSON from object based on e-mail.

I think that is interest even for rest of community :wink: thanks a lot for helping

1 Like

Hey so I am closer, yes. I had to change the Key in the LocalStorage from a variable to a text string. It seems to be working now.

Regarding your specific question, I’m not sure exactly what you mean. I think you can dump whatever you want into the JSON or a list, including email addresses from that column, just identify the data by row/column when you call the Spreadsheet…

Hi! I am having a similar trouble with a flashcards app I am doing with airtable, maybe you can help me.
So what I´m trying to do is to obtain a random row from the “question” column and then show the answer from the same row but “answer” column on airtable. Next clic, another random row from question column, and so on
But I don´t know how to show the answer that matches the question if everytime is shuffle.

Idk if I explained myself

Hi, need help for airtable. If I used many table in a spreadsheet did they share the same ApiKey and baseID? The difference is only the table’s name right? Because my table does not working when i input some text. Before this its functioning but when i add some other table for the other screen then it is not fuctioning. Does the data overlap?

Hi,

If you only have one user account with Airtable, then the APIKey is the same.

However, each table/spreadsheet you create has its own/different BaseID and of course, as you already know, a different TableName.

The ViewName may differ from one table to another unless you are using the default “Grid view” for all your tables, else you also need to change the ViewName for your other tables.

Reference:
https://docs.thunkable.com/spreadsheet

Acho que o meu problema é o mesmo dos usuários desta postagem!

Gostaria de saber como fazer para consultar na tabela airtable na mesma linha valores em colunas diferentes.

Ex.: Como se fosse um cadastro, uma coluna com NOME e outra coluna com a SENHA, e na verificação checar se na linha contem o NOME e a SENHA!

I think my problem is the same as the users of this post!

I would like to know how to query the airtable table in the same row for values in different columns.

Ex .: As if it were a register, a column with NAME and another column with PASSWORD, and in the check check if the line contains the NAME and PASSWORD!

I need your help to do my I my school work, I make apk about medicine stock. Sir, can you help me? How to minus the data from airtable and show the data after we minus or update data after minus(like I have 10 stock of medicine and take 2 medicine and the the data will show 8) I hope you will help me and thanks for the best tutorial

Will you minus the stock from the app yourself and wanting to be updated?

hello, have u find a solution ? i need the same help

@aiasp I have replied you on your topic :+1:

1 Like