[Solved] How to display rows from a table in thunkable x

I have searched and read through a lot of threads but still not able to find an way of iterating through a table and displaying rows.

I am able to GetColumn and display all rows for a single column but looking for a way to get access to all columns in the row in a table. I dont want the getcolumn duplicated for each column.

I am using GetAllRows and get the rows which is an object and when I display, it displays as just Object.

I have defined a few columns within a row, tried listviewer, etc.
How do I get fields from the object (rows) so I can access each column and display it or use it to do something?

Appreciate any ideas, direction.
thanks,
Sharath

Do you want to display the actual table?

Yes, I was to be able to get each column and display them. I have a couple use cases.
One is just display 3 columns in the table as a table in the screen.
Other one is as below:
For example, here is how the row with columns can look:
name | description | URL | icon , etc
I need to be able to get access to each and create a view to display name as a header, then image and description and then show a link for the URL column.

@sharathnagendravjp Awesome! What kind of app are you building? If you share a little more about what you’ve done via screenshots or a share link I can be more helpful. For starters though, check the links in this post

Thanks for the response and the link to that post, looks like a lot of good information.
I will review it and hope to find what I am looking for.
I am fairly new to thunkable, so struggling a little bit on how things work.
One screen is a glossary of terms with definitions. The information is in airtable and was trying to retrieve the rows and display the columns.
I was able to connect to airtable and display data from one column usinig GetColumn, but GetAllRows was not intuitive as it comes as an object and no easy/obvious way to get columns.
Once I get this working, will get to the next screen which has more information.
Not much to show yet, simple, but here is design, blocks and what is being displayed:


image

k. looks like you need a list viewer. and to throw all rows though a loop. see my screenshot below.

first i put all rows into a variable. i send that variable to be filtered. i flter based on certain properties. think about a property as a column position in a given row.

when you put ‘all rows’ into the loop, the loop looks at the entire thing 1 row at a time. then when you say look at property X, you are really talking about column X in the current row that the loop is looking at, starting with the first.

then at the bottom, i take out the particular ‘properties’ of object (row) j. and store them into a variable as a list.

i then can display that list into a list vieweer.

Thanks for your quick response and a solution. I had used a listviewer and that did not give me more than what I was seeing, so had removed it.
I was having trouble with taking the rows and using it. Thanks for your example, will try what you have suggested.
Are you using a function? fetch_chart_1?

Yes. let me show you my sequence. my blocks here end up producing line charts, as a note. but all the info would easily display in a list viewer.

the chart opens and gets the data from airtable


I Make sure all my variables are clear and setup to be lists

then i begin to set my chart up

but waitup, i need chart vairbales, so i filter my data from airtable now

i need the bxname

and bxformat

at this point,i send the my chart setup to my api so it reutnrs a URL to use as a src for an image. when i get it back, i pass the response through this function to parse the response and to clean it up for use.

then i save the shortened URL’s to airtable in the last recorded row. the URL is then sent to another person via Integromat so the chart can be saved forever by the end user

@jared, really appreciate you taking time to share and explain in detail. Thanks a lot!
I was able to get two columns displayed, but it showed only the last row from the table.
In my layout, I had a row and had two columns and displayed the values in each column, but just one row, the last one from the table.
How would I show all rows?
If I have a listviewer, I dont know how to have more than one column displayed.


I had listviewer for a single column that works, but did not know how to put multiple columns in it.

1 Like

If that solved your problem, would you mind marking this as as solved or if you need more help, let us know!

:slight_smile: happy to help!

Sorry, I had just edited my previous response with some screenshots and question. Hope you can answer that.

yep. instead of putting these things into a label. make that a variable. then, try to make the listvieweer show the variable. check this out, for example. i made this for your case.

Hi, @sharathnagendravjp! :wave:

I have used this kind of idea in my previous apps, where I wanted to display three-four columns’ data in one line, i.e. in one item of listviewer. I have used these kind of blocks -

Hope I helped you! :blush:
Thanks! :blush:

3 Likes

Brillant! But I don’t know why in this way the list displayed is in a undefined order… no sort by name or date or order of inserted data… I can’t understand which is the logic behind. Do you have any advise ??

1 Like

Hi, @alfopietro! :wave:

The list is displayed just like your airtable data. But if you still want it to be alphabetically, you can try these blocks -

Hope I helped you! :smiley_cat:
Thanks! :blush:

1 Like

I would it was displayed as it is in my AirTable… but unfurtunatelly it isn’t. I don’t know if I’m in the middle of a bug but there is (apparently) no logic on which order they are displayed!
I see the 7th row as 1st, then, the last as 2nd and so on…sort of random

1 Like

Ok; Just a quick question, how many rows do you have?

Thanks! :blush:

16 very few (at the moment!) :slight_smile:

Nice.

How do you want to sort them? (like alphabetically, etc.)

Thanks! :blush:

1 Like

The best probably would be to sort by reverse order of insert. I mean, I would see the last data inserted first.
Thanks!