When you're starting out in the editor, you're first going to add at least one table. However, as you're working with your data in the editor, you may realize you need to make changes to your spreadsheet. You may decide to add, rearrange, or delete columns. Then, you run into an error similar to the following in the emulator:
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.
For example, let's say this is your original spreadsheet; you have these three columns. Then, you decide to add another column in your spreadsheet and receive the error in AppSheet. After editing the column structure in your data, you need to regenerate the table in the app editor.
You can also modify your app without modifying the underlying sheet.
Regenerate the table
To regenerate the table:
- Open the app in the editor.
- Go to Data
and select the table you want to regenerate.
- Click
in the table header.
- Click Regenerate to confirm the action.
- Save the app by selecting one of the following:
- Save - Save the app
- Save & verify data - Save the app and verify the data defined.
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 by selecting one of the following:
- Save - Save the app
- Save & verify data - Save the app and verify the data defined.
When you sync in the emulator, 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.
Modify the app without modifying the sheet
If you just want to hide or reorder some columns within the app, there are several ways to do so without modifying the underlying sheet.
- Slices allow you to filter out specific columns in any views based on the slice.
- Several view types allow you to control column order within the view settings.
- Individual columns can be hidden by using the Show? option.