New to thunkable and testing CRUD operations on data. I went through examples provided by thunkable on Create, Read, Update data and built a quick prototype. I created two apps, one with local table as Stored Data Source (link provided) and another using google sheets as a data source.
https://x.thunkable.com/projectPage/65257065ec40753aa610bcba
The Read and Create functions work, but the Update function is not updating the local data source. Same problem on the google sheets - not updating.
I attempted coding the thunkable examples exactly as provided but must have missed something.
Thank you, in advance, for your help!
Hi and welcome to Thunkable!
One thing to keep in mind is that the local data source values are only the starting values for the database. If you change those values using blocks, the data source will not show any changes in the Design tab. In other words, the only way to see the current state of the data source is by displaying values using blocks (e.g. set label’s text to get value from data source) while previewing/testing the app.
For the Google Sheet, can you try it without this block?
okay, I removed the create object and tried in google sheets (app link below). No success.
As per your recommendation, I am using “Get property of object blocks” to fetch data. I’m assuming this conforms to your idea.
https://x.thunkable.com/copy/0f85f4b519989dec698614d2e6377cc6
I would think that would work. Have you been able to use the Get Value block assigned to a label’s text to view cell values in your Google Sheet?
okay, I tried replacing “get property of object blocks” to “Get value from …”
Not successful
So maybe re-sync your Google Sheet in your Data Source settings? Or remove and re-add it?
Are you using a personal Google account or a Google Workspace account?
okay, I re-synced google sheet in data source and previewed app … no success
I removed google sheet and then added it back to app … no success
personal google account
I re-looked at the “How to update data in a thunkable source” video https://www.youtube.com/watch?v=ZvaW8YON2oU&t=52s, downloaded that project (which is same as what I’ve done above), copying line-by-line. Same issue … will not update back to google sheet.
I checked permissions on google sheet … restricted. (I also changed to anyone with link).
Is there a chance my account is not connected/configured properly?
Have you tried checking what the app variable selected_Friend_Row
is populating when the page opens? You can create a new label and set the variable to the label’s text.
okay, I created label in FriendsView screen. I get an “[object] [Object]” response on FriendsView screen after selecting a item (on FriendsList screen).
also, I also added same to project from “upload data to source” project above, same response.
Thought? Matt, any chance you could run program on thunkable staff developer account to test if working?
I don’t have a special version of Thunkable as part of the staff here, it’s all the same as what you all have.
Row ID should be a number for the row of the data source. If that variable is being set to something that is an object, like from Get Row Object
, using the Get Value
here with that row ID won’t work.
1 Like
I took a look at your project and noticed that you are using the selectedFriendRow as your Row ID. On the first page you set Add(null)Update(row id) as your row id. To update values in your sheet use that variable as the row id.
Try This
1 Like
Brilliant, Mr TThompson! That did the trick, Thank you for all the help!
1 Like