Using Airtable to control Data Viewer Lists

Hi!

I’m using a Data Viewer list and I have added a table. But the table needs to be updated, and even though I have selected sync with source, it won’t get updated. So I switched to Airtable, but the Data Viewer list isn’t receiving information from Airtable. I can’t use tables inbuilt in the data viewer list, because, they aren’t getting updated.
Any help on this?
Thanks in advance!

1 Like

Any help would be appreciated.
Thanks!

Hi @codeswept, do you want to share one or both versions of the project? I’m not sure why the data viewer list isn’t syncing to your local data source or to Airtable but maybe I can figure out if I see how your blocks are set up.

Sorry for the late reply.
Sure, will send a screenshot.

This is my code for retrieving data:



Thanks!

Why are you looping through “each item j in list rows”? It looks like you aren’t using the “j” variable at all. If that’s true, I would remove that loop. And if you’re using the “list of values” block, you probably don’t need to make an Airtable call at all. You could just start with “for each item i in list [list of values…]”.

But aside from all that, have you mapped the Airtable fields to the data viewer fields on the Design tab? Because you shouldn’t have to use any of those “from Data_Viewer_List1’s” blocks. You should just update the Airtable data and it should sync down to your custom data viewer layout as long as the fields are mapped.

You can use the refresh block. It’s a little annoying because it re-draws the screen each time.

1 Like

Thanks for the answer! What exactly do you mean by

Yes, I just realised that the j variable was useless. I’ll remove that. I have mapped the data in the design tab. It wasn’t working,but I’ll check again and get back.
Thanks!

When I test the Refresh Data block, it erases the contents of the data viewer grid and then re-draws them. So I see the content (titles, etc.) in the grid, then a flash of a white screen, and then the new data (titles, etc.).

1 Like

I see what you mean- I face that too. It’s annoying, but there’s no way to counter it.

It’s working, but if I click a button, it’s supposed to add a new row. Once I have tested that, I tried navigating to the data-viewer-list screen, but the new entry did not appear. Any idea why it didn’t come?
Thanks,
@codeswept

So when you click the button, do you see the new row appear with new data in Airtable?

And then after that, if you navigate to the data viewer list screen, the new data doesn’t appear even though you have a refresh block inside the When Screen Opens block?

First use get column to search out particular column then use get row to read the data from table

Thanks @ramanit12ul