As you customize your app, you might need to modify the column structure in a table to add, reorder, or delete columns in a table. You'll need to regenerate the table if you modify the connected data directly.
- How to add, reorder, or delete columns
- Modify the connected data directly
- Regenerate the table
- Regenerate apps built from Google Forms
How to add, reorder, or delete columns
To add, reorder, or delete columns at the global level, do one or more of the following:
- Modify the connected data directly to add, reorder, or delete columns.
- Show or hide columns by using the Show? option.
- Conditionally show or hide a column value (
Show_If
). - Add a virtual column to add a column that is automatically computed using an app formula expression, but that doesn't correspond to an actual column in the connected data.
- Add a slice to reorder or filter specific columns in views. See Slice columns.
- Improve the presentation of detail and form views by using Show types.
To add, reorder, or delete columns for a specific view, for a subset of view types you can control the column order in a view.
Modify the connected data directly
You can modify the connected data directly to add, reorder, or delete columns. For example, if in your original spreadsheet you have three columns and decide to add another column, as shown in the following figure.
After modifying the column structure in your connected data, you need to regenerate the table in the app editor. If you don't regenerate the table, you might see an error similar to the following in the app preview:
Unable to fetch app definition: Error: There is a mismatch in the number of columns between the spreadsheet for Class Descriptions and the table schema. The table has 5 columns but the schema has 4 columns. Please regenerate the table column structure.
Regenerate the table
Regenerate a table whenever you add, reorder, or delete columns directly in the connected data.
To regenerate the table:
- Open the app in the editor.
- Go to Data and select the table you want to regenerate.
- Click Regenerate schema in the table header.
- Click Regenerate to confirm the action.
- Save the app.
You are opted in to the new editor by default, but you can switch back to the legacy editor at any time.
If you are using the legacy editor
- Open the app in the editor.
- Go to Data > Columns.
- Expand the table you want to view or edit.
- Click Regenerate Structure.
- Click Regenerate to confirm the action.
- Save the app.
When you sync in the app preview, you'll now be able to see your additional column in whatever view(s) you have set up.
Regenerate apps built from a Google Forms
If the app was built from a Google Form, the original form configuration will be stored in the response sheet in the form of notes attached to the header row. Regenerating will cause the columns to restore the settings contained within the notes, potentially overwriting changes you've made in the editor. To avoid this, remove the notes from the response sheet before regenerating. If you do accidentally regenerate with notes left in the sheet and lose your configuration, remember that you can restore an older version of the app using version history.