How to use New Data Viewer as an Extended Listviewer

Hello,

With the new feature that was just released, i was wondering the way of using that as an Extended Listviewer. In my proyect, i have a list of objects, and i want to show every object of that list as an extended listviewer. There are some great tutos of doing it using “clone” functionality, but as i have said, now the graphical aspect is created in the Data Viewer, but i cannot chose other sources appart from Google Sheets, Airtable or LocalDB.

Any ideas?

Thanks in advance!

where do you want to import your data from?

1 Like

In my case i have the data in airtable, then using Airtable Api, i filter the results. I do some operations with those results and i generate a new list of objects.This is the new list that i want to show in an extended listviewer.

I was thinking in writing those new values in a LocalDB and then showing them in the Data Viewer, but it doesn´t seem the best way…

We have docs for both the List and Grid variants of the Data Viewer:

Both can use Airtable as the data source, and it’s really easy to set up.

2 Likes

@domhnallohanlon Thanks for the answer.

But maybe i didn´t explain well the problem. The process would be:

AIRTABLE → Filter the info (using Airtable API) → Do some operations with that filtered info (in Google Cloud) → Getting the new info and saving it in a list (list of objects) → Showing in a Data Viewer (as it was a Estended ListViewer)

The last step is my stone on the road…

Thanks.

1 Like

Is this part just an API endpoint that returns some JSON though? Or after the “Google Cloud” will you data end up in Google Sheets?

2 Likes

Exactly, i get the Json and i place the values in a list variable. The idea is not to upload anything else online, just to show that list.

so you call airtable and bring data to the phone. send the result to google to turn it into JSON. then bring it back to the app?

1 Like

Today it doesn´t seem to be my best day explaining… jejej.

I take (LIST 1) from airtable but using the api, because i filter with formulas. Then i send some fields of that LIST 1 to gcloud for analysing (i want distances, angles and other things in between several points and thunkable takes too much time to process it). With the results given by gcloud i can select with elements of LIST 1 are aceptable, so with them i create LIST 2. This LIST 2 is the one that i want to show.

This LIST 2 would be the items inside “records”, something like:

{“records”:[{“id”:“rec0D4tgt5V34nN”,“fields”:{“Distance”:“6.66 km”,“Name”:“Example1”,“Angle”:“78.9º”,“Type”:“Absolute”,“Plazas totales”:“2”,“Date_of_finding”:“2020-05-07”,“Hour”:“7:35PM”},“createdTime”:“2020-05-05T21:17:40.000Z”},{“id”:“rec0D4tgt5V342Hb”,“fields”:{“Distance”:“7.8 km”,“Name”:“Example2”,“Angle”:“22.5º”,“Type”:“Absolute”,“Date_of_finding”:“2020-05-07”,“Hour”:“6:05PM”},“createdTime”:“2020-05-06T22:17:30.000Z”}, …]}

3 Likes

That makes sense. wow! that’s sweet!
do you retrieve the data via API?

1 Like

Yes, thunkable is great but there are some things that cannot be done with it, so, i survive using APIs :rofl:

Anyway, thanks for your effort.

I’m doing a very similar type of thing exploring how to put them into a local data source. Not having the ability to delete rows in the local data source is causing some issues and could lead to an ever expanding table, but you can write over rows. So as long as your number of rows needed doesn’t change you should be able to make it work.

Just create a local data source and then convert the json into the rows. You’ll have to pre-define the columns, so the column names can’t change. The columns will be your keys and the row(s) will contain the data.

You can also clear any unused rows by just updating them as empty. It’ll show the rows, but the user won’t be able to click on them and you can make them at the end of the table.

1 Like

Jonathan, I think I figured out a way to do what we need. Here’s a post that leads you some of the way. Create all your local rows with the blocks and make sure to save the row IDs in a list or you’ll be hurting later. If you need more help let me know.

1 Like

Thanks Athornock,

Updating (and overwriting) the table will work just if the table has always the same length, but if it has different number of rows for every iteration there is a problem… I tried to use “null” or “” to try to eliminate the rows but it is not working. Or at least i don´t see how.

Yeah, I don’t have a work around for that. If you think of one let me know. They really need a delete row method. It would also be nice to define tables with blocks and use variables in the blocks to call the tables. I’m sure they’ll get them in the next month or two.

1 Like

I’m working on a workaround :slight_smile:
But I also had to mow the grass, clean house, read a chapter and write a page, take care of the kids, go on a mature walk… life + coding today did not mix well

2 Likes

Hey by the way Jared,
Do you have any fantastic solutions to run processes in the background?

this is where I’m at so far.

i think i need to limit what i put in so that there is a fixe number of rows.


2 Likes

Looks good so far, that’s about where I’m at. The problem is deleting rows. The best I’ve been able to figure is only load so many at a time and keep the table down to like 10 or 15 rows that I just keep updating. Then I have a button that says load more.

At the very end of the data list I’m emptying any rows with blanks “”. That may leave some blank rows, but at least it’s manageable.

I’m curious to see what your solution is.

1 Like

That was my exact thought :slight_smile:

1 Like