AirTable / Spreadsheets Woes for iOS

Trying to pull data from my Airtable. Have the code set API, BaseID, Table Name & View name upon the start of the screen. Then, trying to ‘get column’ from the spreadhseet --> I have set the column name and for ‘20’ rows. Then, I am setting the text of a list viewer to the ‘column’ block.

I keep getting the error message “Undefined is not an object.’ (evaluating ‘this.table.select’)”

Any help would be appreciated & thanks all

1 Like

Try to make debugging in parts. The code from the blocks below shows you in the Label the data from the table?

getallrows

If the data is not displayed, then the problem with access to AirTable. If the data is displayed, try the code below.

getcolumns

Thanks for the response! I tried the first code and it returned in the label “undefined”. I suppose that means it is a problem with access to the AirTable. Any suggestions there? Is this something I should expect to work with live test or should I go ahead and download the code and run it directly off my iOS device?! Thanks again for the time and help!

This should work both during live test and if you download it to your phone.

1 Like

@onedam,

The code of the first block must return a list of data in JSON format. In my table there are 2 columns (Age and Name) and it is displayed like this:

[{“Age”: “1”, “Name”: “Igor”, “_ id”: “recShU …”}, {“Age”: " 56 “,” Name “:” Peter “,” _ id “:” recCPE … "}]

Returned in the label “undefined” - it is very strange. If the Key API, Base Id, Table or View is incorrect, an empty list “[]” should be displayed. Try to reinstall Thunkable Live.

Will do…I’ll keep you posted & thanks again for the help!

Quick question - when pulling the BaseID from the node.js script, I find it in the format ‘app…’
Am I correct in assuming that we do not include the apostrophes in our BaseID text within thunkable. Thanks for the time and help

I re-installed the thunkable live app to an iphone - still returning undefined and the error message still returns ‘undefined is not an object’

I renamed my table from ‘table1’ to ‘table’
I renamed the view from ‘Grid View’ to ‘grid’ …these are the texts I am inputting to the respective spreadsheet blocks. The error wouldn’t lie within changing these?!

API begins with ‘key…’
BaseID beings with ‘app…’ These seem correct…correct? (Note: I do not include the apostrophe’s when inputting text into blocks)

Just FYI: I also changes the column names…don’t imagine it is the problem but figure more information can’t hurt! Thanks for the time and help

I used to have problems with AirTable and helped me solve their Mark. I sent him an email link to my Thunkable application and my project in AirTable. After that, everything worked.

1 Like

who helped you solve it?

Try to contact Mark via the link here

In AirTable IDE there is a link “Help” | “API Documentation” where you can see the line "$ curl https: //api.airtable.com ...." in the “Example using query parameter” section on the “curl” tab. Try https: //api.airtable.com .... in the browser. All data from you table is displayed?

That was me. Sorry to hear about your troubles, Adam.

Please feel free to send me a share link to your Thunkable project (see here for how), via a direct message. That should be a good start in diagnosing your problem. It might also help if your could send me a share link to your Airtable base (see here for how).

-Mark

I tried this and received a white page with the following:

{“error”:“NOT_FOUND”}

Thanks again for the time and help!

Thanks for reaching out Mark! I just tried to send you a direct message and received something along the lines of ‘personal messages may not be sent to this user’ Not sure if I tried the wrong avenue…

Now something is beginning to clear up. We need to understand your problem - is it a problem with AirTable or with Thunkable X? I think the problem is with AirTable. Have you been able to send Mark a link to your AirTable project?

I think I understood the problem. Somehow, there is an empty {} object among the rows in the AirTable table, which causes an error when getting records in Thunkable X. If you delete this row, everything should work.

Adam was able to get in touch with me. It turns out that there is a bug in the Spreadsheet component such that dynamically setting the Spreadsheet’s properties (i.e. via blocks) does not take effect. If you set those properties in the designer then things work. We should be getting around to that bug reasonably soon.

-Mark

Thanks Mark,

It was interesting to know. I did not use the blocks and the onedam project worked well for me.