You can tweak the schema generated by AppSheet. But please do so carefully!
In the Data>Column Structure tab of the Editor, you will see the column structure that AppSheet has deduced for your data. As we have discussed, this is often not exactly what you want. The best way to change it is to change your spreadsheet, but if that is not possible, you may also decide to change the schema directly. These changes can include:
- Column Name
There should rarely be a reason to change the field name. If the field name is not the same as the column header name in your spreadsheet, errors will occur. This capability is useful for advanced scenarios where the data comes from non-spreadsheet sources.
- Column Type and Type Qualifier
There are approximately 20 different data types and we expect this to grow (You can find the official list here). The choice of data type affects the behavior of this field in the app. For example, you might want a particular text column to be a 'LONGTEXT', or a particular image column to be a 'THUMBNAIL'.
- App Formula
App formulas are expressions that are automatically computed in the app to populate the value of a column. This is not to be confused with spreadsheet formulas, which are computed in the backend spreadsheet. If a column has an app formula, the end user of the app cannot provide a value to override the formula.
- Primary Key
Keys should be chosen with care, as discussed in an earlier section. Please note that only one column can be a key. You will find composite columns at the bottom of the column list, and one of them may also be chosen as a key.
- Read-Only, Hidden, and Required
Individual fields may be marked read-only to prevent updates in the app, hidden to prevent display, or required to mandate entry.
- Column Description
The description, if provided, is shown to the user instead of the field name in forms. It is automatically populated from comments on the column header cells in the spreadsheet.
- Initial Value: when a new entry is created in the app, the fields are populated with default initial values that are typically constants but can be any supported expression that matches the expected column type. If this is an expression, it is recomputed until the end user of the app explicitly provides a value.
Indicates that the data values in the column can be searched using the Search button. By default, Search is enabled for most text-based columns, but is not enabled for columns containing images, files, and the like. You can modify the Search attribute to control which columns are searchable.
Search is text based. It is both case insensitive and diacritic insensitive. Search is performed against the entire table, including column data values that are not currently displayed on screen.
Indicates that a column can be filled by scanning a barcode or QRCode. By default, no column is scannable unless explicitly indicated.
- Sheet Formula
Indicates a formula on the backend spreadsheet that is calculated (and the result shown in the app) once the user hits "Save" (or "Sync" if the app is set to "Delayed Sync").