Thankable x how can i refresh auto screen always
Use a loop to constantly update any labels with current info
do you some Example to show me please
I am trying to wrap my head around this too, without doubling my code blocks. I am trying to see if I can move my app to API calls versus web viewer, but I cannot find any easy way to mimic the auto-refresh of a web page after, say, 60 seconds. Has anyone had any luck with this?
timer component that fires every 60 seconds and calls whatever you want to update.
I’m referencing a specific cell from a Google Spreadsheet document, its content will be used for the label. It doesn’t however seem to update. I’ve alredy tried to force it to update by calling refresh on a data viewer list that’s hidden on the same screen, somewhere underneath a layer, but it doesn’t seem to work.
Any idea what I could try?
Thanks in advance.
(P.S., that huge pink block is to isolate the value, because it’s CSValues)
As far I know all dataviewers are connected to a datasource.
The refresh blocks just do a full read of the datasource to display in the dataviewer.
But if the content of the datasource stills the same nothing will change.
So, I know three ways to do a real refresh on dataviewers:
Doing a full refresh on the datasource, reloading all the data again (in my case data coming from Firebase). To do that I use the “delete all rows” block and after repopulate the datasource using the “create row” blocks in a loop. But I never used spreadsheets as datasources, so I’m not sure if this approach can work in this case.
Use the “update row” block to force refresh an specific row on your datasource that will be reflected in your dataviewer, but will work only if you do this update on the same screen of your dataviewer.
You can “paint” the new values directly in a specific row of your dataviewer, assigning these values directly to the labels you are displaying in that row. Instead to use “get” blocks you can directly assign th values of your dataviewer elements rows. But this is possible only if you have some access to the new values to assign in your dataviewer (usually when the user inputs the data on your app).
Hope it helps.
There was always an issue with the
Get Value block not showing the updated value and therefore as a workaround I will read the values of these cells direct from the Data Viewer instead from the
Get Value block.
Is this still occurring? I haven’t noticed any issues using that block lately.
I can say a big YES.
With all data sources?
Local table works for me no problem. I don’t usually use airtable or google sheets.
I’m having problems with Get Value and even Get Row Object not getting current values from Airtable. I can see the value of the cell in Airtable and when I do a Get Value from three instances of the same project (web app, browser preview, and Thunkable Live), there are different values shown for the same code blocks (Get Value or Get Row Object).
For example, I would think these blocks would create a new row in Airtable (they do), set the Game ID value of the new row (they do), find the row # of the Game ID (nope… its value is 0), and then display the row # (nope, still 0):
Here’s the table after the create row block runs:
Seriously, if there was a fix for this within the next couple days i’d get an idiotically higher grade for my project haha. I’d actually manage to demonstrate it properly