Wondering if someone can help me please. I am very new to thunkable. I have set up an airtable spreadsheet and can successfully send data (i.e. create rows) from my app. I can also access all of the rows from a particular colum using the GetColum method and display in the list viewer.
I am stuck at the GetAllRows method. in my mind, this should display the entire airtable spreadsheet (i.e. all 3 colums that I have and the 5 rows) in my list viewer? or am i mistaken? I have attached my attempt at this. I can’t seem to find an answer to this in the tutorials or other reference pages.
Hi, @b-rabbit,
You are doing a small-looking big mistake
You should replace rows in the insert in list block with for each item j.
What you were doing is, adding a list in a list as an element. (since output rows of get all rows gives list of rows)
This won’t work. You want to add item in a list, but you were adding a whole list as an element.
Hope this helps! (If helps, then close this topic and mark this post as Solution.)
Correct.
But to make a point, perhaps the insert element into a list block is not optimally worded, with “as” which is more indicative of a format of some sort. Maybe it would help clarify things if that was replaced by “item” or something like that.
Thanks @kartik_old and for the advice, unfortunately I am still not getting any data displayed when I open the screen, see updated screenshot of what I have changed in my block.
@b-rabbit, You’re a little bit mistaken The 'text items' property of the list viewer needs to be a list of text values. However, each row 'j' of the Airtable spreadsheet will be an object representing that row. That object will contain a 'name' property and 'tank' property and a 'BCD' property. You’ll want to combine those properties into a single text value, formatted as how you would like it to appear in the list viewer. You might want to take a look at the Objects and Text documentation for more info.
Right @Mark , but it can also be used if the variable initialization block is “Initialize global Applist to (create empty list)”, then the listview might show the items
@Tanmay_Kulkarni_15 - those look like Classic blocks to me. In Thunkable X you can initialise an empty list with blocks like this:
Once you have the app myList variable you can use it to store responses from Airtable, and if you want to delete the contents of the variable, simply set to back to an empty list again.