Structuring Your Columns
As you determine all your tables, you'll use this section of the editor to review each column's type and properties and make changes to them within the editor.
This is what the column structure tab looks like. From here, you can customize the columns in your tables, relate different tables to one another, and more.
Column Basics: Name and Data Type
Each column has a name. The editor determines the name of your column based on the top cell in the spreadsheet of each column. The editor deduces the type of data you have in your column based on the data in it.
For instance, if you have a column named "Birthday" and all of your data points look something like "03-20-2000", AppSheet will assume the column is of type Date.
The editor often correctly identifies the data type, but when it doesn't, you can change it with the dropdown menu on the right side of the "Type" field.
This capability is useful for advanced scenarios where the data comes from non-spreadsheet sources. Another case where the column type may be different is that of the App column type, which is used to navigate to different views or apps. However, if you're just getting started, using the default types should work pretty well.
There should rarely be a reason to change the column name. If the column name in the editor isn't the same as the column header name in your spreadsheet, errors will occur.
If there's a mismatch between columns in the app editor and the spreadsheet data, you'll get an error that means you need to regenerate the table.
Keys uniquely identify each row from other rows using a particular column.
The key may be a single column (such as Employee ID) or two or more columns (such as FirstName and LastName). Each row in the table must have a key value that uniquely identifies it. In other words, no two rows in a table may have identical key values. This is critical, because it allows AppSheet to reliably find the right table row.
When a user changes data in the app, they're making changes to a local copy of the data cached on the device. When the user syncs these changes to the server, AppSheet sends the updated data to the server, finds the updated row using its unique key value, and applies those changes to that row. AppSheet can only find the right row because each row has a unique key value.
There are several ways keys can be determined. They can be natural or computed depending on the case.
Two Types of Properties: Roles and Behaviors
Roles determine what a column is, behaviors determine what a column does. There are several properties you can change for the role and the behavior of a column. This means you can customize your column so it functions exactly as you want. These roles and behaviors can be controlled in the Column Structure tab; to control other aspects of columns, such as their order, please look at the UX section.
To make these customizations, there are two places you can go. One way to change your column's properties is with the properties editor button:
Here, you can make changes to your column's role using different qualifiers. You can learn more about how to use app formulas and initial values in your columns.
You can also make changes to your column's behavior:
Another way to change your column's role and behavior is with the "Show All Properties" button here.
You also have the option to add virtual columns. Sometimes, virtual columns are system-generated and you'll see them show up in your column structure. You can use virtual columns to create Row Labels, allowing you to identify columns that are the most important in a table.
We strongly recommend you make your min and max length, as well as your Valid_If, Show_If, Required_If, and Editable_If constraints, in the "Edit this column definition" view. This is because when you select the "Edit this column definition" icon, whatever expression you write in this view will also appear in the "Show All Properties" view. We recommend you write your expressions directly in the editing view rather than in the "Show All Properties" view.
If you make changes to the structure of the columns in your spreadsheet, you need to regenerate your table. This ensures the editor will take in the new data you've added to your spreadsheet without running into errors.