Manage the columns in a table as described in the following sections:
- Understand the column data types
- Add a column
- Edit the column name or data type
- Set column labels
- Duplicate column
- Rearrange columns
- Freeze columns
- Lock columns
- Delete a column
Understand the column data types
The column data types supported by AppSheet databases map to the same data types in the AppSheet app editor with the exception of the following:
- Row ID column data types.
Each row inside an AppSheet database has a unique Row ID automatically assigned to it. Row IDs act as a key for linking data from one table to another. This makes it easier to manage data inside the database editor such as linking data across tables usingReference
columns. The Row ID column is hidden by default in the database editor. If you want to show the Row ID in the database editor, add the Row ID column to the table.You can select a different table key inside the app editor, but before doing so it is important to consider if the table is being referenced. If you change the table key, these references will break since the database will continue to use Row ID as the key. This means if the referenced table does not use Row ID as the key, the column type inside the database should not be a
Reference
. To learn more, see Row ID. - Lookup column data types.
Lookup
column data types are converted to the type of the column that they reference.
For more information, see Column data types.
Also consider the following:
- When using
Reference
column data types, you can only reference tables within the same database. See Add references between tables. - If you have an
Enum
drop-down column that doesn't have options defined, a permanent warning is displayed in the AppSheet app editor prompting you to regenerate the schema. To avoid this error, make sure that theEnum
drop-down column has at least one option defined.
Add a column
To add a column to a table:
- Open the database in the database editor.
- Select the table tab.
- Do one of the following:
- To insert a column after the last column in the table:
- Click + Add column in the header bar
- Click Columns in the toolbar to display the Edit table columns dialog and click Add new column
- To insert a column to the left of a column:
- Click More > Insert column left adjacent to the column name
- Click Columns in the toolbar to display the Edit table columns dialog and click More > Insert new column above adjacent to the column name
- To insert a column after the last column in the table:
- Enter the name of the column.
- Select a column data type.
- Click Save.
Edit the column name or data type
Date
data type to a Video
data type, a confirmation warning is displayed to indicate that row values that cannot be reasonably converted to the new type and will be left empty. You can undo the column data type change if you are not satisfied with the results of the conversion.To edit the column name or data type:
- Open the database in the database editor.
- Select the table tab.
- Do one of the following:
- Click More > Edit column adjacent to the column name
- Click Columns in the toolbar to display the Edit table columns dialog and click More > Edit column adjacent to the column name
- Edit the column name. It must be unique within the table.
- Optionally, select a new column data type from the drop-down list. (See the Note above.)
- Configure the column data type, if required.
Note: You can configure options forColor
,Enum
,EnumList
,Lookup
, andProgress
types only. - Click Save.
Set column labels
Labels allow you to choose the most important columns in a table. Labels determine which columns are prominently displayed for that table, similar to a title. One non-image column and one image column can be used as labels. All tables have a non-image label.
Set column labels as described in the following sections:
Reference
column data type, the column label is used to identify the content that is used in the referenced table.Set column as a label
To set a column as a label:
- Open the database in the database editor.
- Select the table tab.
- Select More > Use column as label adjacent to a column name.
Note: The Use column as label setting does not appear for the column that is currently selected as the label.
You can't unset a non-image column label; you can only set a different column as a column label.
Set column as an image label
To set a column as an image label:
- Open the database in the database editor.
- Select the table tab.
- Select More > Use column as image label (for Image data types only) adjacent to a column name.
Note: The Use column as image label setting does not appear for the column that is currently selected as the label.
To unset an image label, select More > Unset column image label adjacent to a column name.
Duplicate a column
To duplicate a column:
- Open the database in the database editor.
- Select the table tab.
- Do one of the following:
- Click More > Duplicate column adjacent to the column name
- Click Columns in the toolbar to display the Edit table columns dialog and click More > Duplicate column adjacent to the column name
A column is added to the right of the duplicated column named as follows: columnname - Copy
Edit the column name and configuration, as appropriate.
Rearrange columns
To rearrange columns in a table:
- Open the database in the database editor.
- Select the table tab.
- Do one of the following:
- Press and hold the left mouse button over a column header and drag the column to its new location
- Select More > Move left or Move right adjacent to a column name
- Click Columns in the toolbar to display the Edit table columns dialog, press and hold the left mouse button over a column header, and drag the column to its new location
Freeze columns
Freeze a column so that it stays in view on the screen while you scroll horizontally. This is useful when you have a lot of columns and want to keep specific data in view.
To freeze a column:
- Open the database in the database editor.
- Select the table tab.
- Click More > Freeze column adjacent to the column name.
To unfreeze a column, click More > Unfreeze columns adjacent to the column name.
Lock columns
Lock a column to prevent anyone with the appropriate database permissions from editing it. A locked column displays the lock symbol:
To lock a column:
- Open the database in the database editor.
- Select the table tab.
- Click More > Lock column adjacent to the column name.
To unlock a column, click More > Unlock column adjacent to the column name.
Delete a column
To delete a column:
- Open the database in the database editor.
- Select the table tab.
- Do one of the following:
- Click More > Delete column adjacent to the column name
- Click Columns in the toolbar to display the Edit table columns dialog and click More > Delete column adjacent to the column name
- Confirm the delete operation when prompted.