In this block if we need to change the column then we have to manually change it. Column name cannot be programmatically changed as far as I understand. It cannot be passed on as a parameter. Assume I have 15 columns and I want to edit a given column does that mean I have to have 15 “update value in blocks”?, one block for each column? Assume you have multiple Sheets(Table) then modifying a particular Sheet/Col would be very tough? This question has been asked in the past many years in diffrent ways and as of today I could not find a good solution. Please advice …
The main reason why there isn’t an existing “change column name” block is because Thunkable expects you to set your headers (your column names) as it is. Everything else but the header will change once you update your table.
Never tried this before, but maybe if you were looking to change the header text, find some way to get the input of another value you have entered (this value must be in your data column). Then, you can use the VLOOKUP method (I’m pretty sure I mentioned this to you) to find the header. Finally, set that into a variable and use the update value block. Your variable will act as your row id.
Again, never tried this, so it’s possible may or may not work.
If you had a different question referring to updating a value INSIDE a column, then you would use the count with i from 1 to [list of values in myLocalTable]
command. This will continuously loop through your database values until it finds the first matching piece of data.
Thank you very much for the response @krish05. The names Thunkable uses and the Google Spreadsheet uses are bit confusing. So let me share three images:
Image 1:
Image 2:
Image 3:
When Thunkable says myLocalTable it means the name of the Google spreadsheet.
Table 1 = Produce, Table 2 = Grains and Table 3 = Poultry
Default View = I have never understood what it means and we will not worry about it for now
Table1/Column 1 = Vegetable , T1/Column 2 = Fruits and T1/Column 3 = Legumes
So with a given “update value in” block one can update just Table 1 and Column 1
To update Table 1, Column 2 you would need a different “update value in” block because there is no way I can think of or figure out to change the value of column programmatically. So that means to update the above spreadsheet we would need totally 3x3 “update value in” blocks. Unfortunately in my real life spreadsheet I have about 16 Tables and 5 columns in each. That means I need 16x5= 80 “update value in” blocks. It becomes a BIG mess. So if in any way I can modify the name of the Table and Column programmatically like we do “row id” and “value” that would make my life very easy. I hope there is a way to do it in Thunkable. Kindly enlighten me.