Hi, I am working with a data viewer list and it is connected to a google sheets. I would like to add 1 to a value every time I click on a viewer item. But I noticed that it only adds 1 the first time I click the item, is there a way to do this? Like counting every time an item is clicked
Yes, you can definitely do this. Share a screenshot of your blocks and someone can help fix what you’ve tried.
Okkk, thanks!! I actually simplified the problem a bit. I have a table in google sheets and this table is constantly changing. So when I click on the first item in the data viewer list it should extract some data from that table. However, it only works the first time. When the source table changes and the data viewer is refreshed, a new data appears in the first row, but clicking on that item (which now appears first) continues to extract the information from the item that was previously at the top of the list. In other words, when an item has already been clicked, it no longer extracts information but always detects it, even when the table is changing.
That sounds like a slightly different issue. I don’t have a lot of experience with syncing Google Sheets to Thunkable – beyond using static data – but I believe people have mentioned that you have to re-sync them to update the data in Thunkable.
Oh ok, but how could I do that (res-sync)? Is there a block for that?
Yes, in the Data Viewer List component, there is a Refresh Data block.
Ok, but I am already using it (in other block)
I just tested it with a Google Sheet and my data synced with the new Google Sheet values when I used the Refresh Data block or navigated to a different scene and then back again.
Here’s the project. It may convert my Google Sheet to a local data source but you can at least see the blocks I’m using.
Thanks! But I think I am not describing my problem correctly. the thing: The data viewer list is refreshed and it shows the new data, but when I click on that item it gets the old information, visually it is updated, but when I click it get wrong data
Btw I am using old version of thunkable, should I use the new one? (I see you are using other version in that project)