Dear nice fellows,
I'm seeking advice regarding renaming the columns of tables. I've tried different approaches:
I think it would be nice to have an intelligent official mechanism to perform such task, especially that column positions are preserved in the sheet.
Do you have recommendations from your experience? Thank you!
Solved! Go to Solution.
Yes, changing column name is a pain.
I do my best to try naming them the right way from the get-go and prevent any change after that ๐
In my incredibly limited experience, I used method 1 but with a backup app to transfer all my information back across to save myself the trouble of forgetting formulas or settings.
Sorry, I wish I could help!
Hi @Joseph_Seddik ,
This is not a direct answer to your question but something that could be useful in such situations. AppSheet gives you ENTIRE documentation ( Starting with tables, slices, and column names and expressions, slice row filter expressions, column expressions etc. So if you are changing a column name , you can beforehand know where it is used if you download AppSheet app documentation at the option below. Once you download, you can simply search by say a column name, and you will get all instances of that column name , whereever used in the entire app-slice expressions, actions and column app formulas and so on.
This documentation tip was originally shared by @Fabian_Weller a couple of years ago.
I have had the same problems happen whereby complex formula are deleted.
The way I do it is to use the Version History of the app to view what those formulas were and then copy/paste them to the current version.
Just a small inconvenience really.
Hope that helps ๐
When renaming a column, change the name in the spreadsheet, manually change the name in the app editor, then regenerate columns. This will preserve the column's configuration. Note that AppSheet won't care that the column name in the spreadsheet and the column name in the app don't match until you do a regenerate. You can even save with the name mismatch and AppSheet won't care. AppSheet accesses column data by column number, not column name; the names are just to setup the mapping.
You could copy the app and make your changes in the copy. When done and working, copy back to the original. This is cumbersome because you've potentially got a large set of changes that may take a long time.
You could copy the app, make one change in the copy, see what breaks and what's needed to fix, then make the change in the original, knowing what to expect. Good if you want to make incremental changes during a well-defined maintenance window.
You could add a column of the new name to the app, migrate to the new column, blank the old column in the spreadsheet and regenerate columns. This approach keeps the app working with the old column as you migrate and for users that haven't synced recently.
It is not necessary to regenerate your Table just to rename a column. In fact I would suggest not doing this, as you can more easily wipe your configurations this way. Simple change the name in both source and app at the same time, and save.
Steve said "AppSheet accesses column data by column number, not column name". This is true only for spreadsheet sources, and it the opposite for database sources.
My suggestion above works for both source types. However once you change the name in the database source, any app users that try to use the app without syncing first will be met with errors requiring recovery. Changing names on spreadsheet sources generally do not encounter such errors.
Yes, changing column name is a pain.
I do my best to try naming them the right way from the get-go and prevent any change after that ๐
Yes ๐ that's the correct way to do it. But sometimes as you've seen you need to change ๐
Anyway, thanks my friend.
In my incredibly limited experience, I used method 1 but with a backup app to transfer all my information back across to save myself the trouble of forgetting formulas or settings.
Sorry, I wish I could help!
Thanks much!
Hi @Joseph_Seddik ,
This is not a direct answer to your question but something that could be useful in such situations. AppSheet gives you ENTIRE documentation ( Starting with tables, slices, and column names and expressions, slice row filter expressions, column expressions etc. So if you are changing a column name , you can beforehand know where it is used if you download AppSheet app documentation at the option below. Once you download, you can simply search by say a column name, and you will get all instances of that column name , whereever used in the entire app-slice expressions, actions and column app formulas and so on.
This documentation tip was originally shared by @Fabian_Weller a couple of years ago.
Hello @Suvrutt_Gurjar
Iโve seen that the app definition is actually JSON-like. It would be nice to be able to edit this file and upload it to AppSheet.
Imagine being able to build an entire app with a script ๐
I agree with you @Joseph_Seddik with you on file upload option possibilities.
I have had the same problems happen whereby complex formula are deleted.
The way I do it is to use the Version History of the app to view what those formulas were and then copy/paste them to the current version.
Just a small inconvenience really.
Hope that helps ๐
Thanks Scott ๐
When renaming a column, change the name in the spreadsheet, manually change the name in the app editor, then regenerate columns. This will preserve the column's configuration. Note that AppSheet won't care that the column name in the spreadsheet and the column name in the app don't match until you do a regenerate. You can even save with the name mismatch and AppSheet won't care. AppSheet accesses column data by column number, not column name; the names are just to setup the mapping.
You could copy the app and make your changes in the copy. When done and working, copy back to the original. This is cumbersome because you've potentially got a large set of changes that may take a long time.
You could copy the app, make one change in the copy, see what breaks and what's needed to fix, then make the change in the original, knowing what to expect. Good if you want to make incremental changes during a well-defined maintenance window.
You could add a column of the new name to the app, migrate to the new column, blank the old column in the spreadsheet and regenerate columns. This approach keeps the app working with the old column as you migrate and for users that haven't synced recently.
Thank you @Steve! The solution of blanking the columns is very useful.
I am bringing your explanation also here for all to see!
โ
It is not necessary to regenerate your Table just to rename a column. In fact I would suggest not doing this, as you can more easily wipe your configurations this way. Simple change the name in both source and app at the same time, and save.
Steve said "AppSheet accesses column data by column number, not column name". This is true only for spreadsheet sources, and it the opposite for database sources.
My suggestion above works for both source types. However once you change the name in the database source, any app users that try to use the app without syncing first will be met with errors requiring recovery. Changing names on spreadsheet sources generally do not encounter such errors.
Thank you master @Marc_Dillon. I didn't know about this!
Change the column name both in the data source and appsheet to the new name.
User | Count |
---|---|
18 | |
11 | |
11 | |
8 | |
4 |