Fields
Add, edit, delete, hide and reorder the fields of a table or collection
Use this page to set what fields a table has. All the fields of a table are called its Schema. A view has no schema of its own. See View.
You must be an Item organizer or higher on the table to change its schema. See Who can do what.
Open the schema
- Open the table or collection. See Open an item.
- Click the Schema icon in the toolbar.
The box shows the fields one row at a time, with Index, Display name, ID, Type and a gear button, Settings. If you can change the schema, there are also a Visible button, a bin button and a handle for dragging.
A table has fields that the platform adds itself, such as ID, createdAt and updatedAt. Most are hidden and show a crossed-out eye. If you can only view the schema, the box has only a Close button and does not show hidden fields.
Add a field
- Open the Schema box and click Add field at the bottom left.
- Type the Display name.
- Choose the Type. See Field types.
- If every record must have a value in this field, tick Required.
- If there is a Default value, choose it. See Default values.
- Click OK, then click Save.
Save keeps all the changes in the box at once. Cancel throws away everything you changed since you opened the box.
Field types
| Type | What it stores |
|---|---|
| String | Text |
| Number | A number |
| Boolean | True or False |
| Date and time | A date with a time |
| Date | A date |
| Time | A time of day |
| One to one relationship | One record of another table. See Relationships. |
| One to many relationship | Several records of another table. See Relationships. |
| Multiple attachments | Files. See Attachments. |
| Geometry | A point, line or area. Only in collections, and it comes with the collection. You cannot add, change the type of, or delete it. |
| Array, Object | You cannot choose these when you add a field. A table imported from a file may have them. See Import data. |
Default values
Data Studio fills in the default value when you open the form to add a record. You can change the value.
| Type | Choices |
|---|---|
| String | None or UUID, which makes a unique value for every record |
| Boolean | True or False |
| Date and time | None or Current date and time |
| Date | None or Current date |
| Time | None or Current time |
Other types have no default value. If you change the Type, the default value is reset.
Edit a field
- Click the gear button on the field's row.
- Make the change in the Field box, then click OK.
- Click Save.
For a field the platform added, such as ID, you cannot change the Type.
Change the order of fields
- Drag the handle at the left of the row up or down.
- Click Save.
Tables and forms put fields in this order. The exception is the table, where the ID and Geometry columns are always first.
Show or hide a field
- Click the eye button in the Visible column. A crossed-out eye means hidden.
- Click Save.
A hidden field does not show in the table or the form, and is not in an exported CSV file. The field's data is still all there.
Delete a field
- Click the bin button on the field's row.
- Click Save.
If you change your mind before saving, click Cancel. You cannot delete a field the platform added, such as ID.