Field
Use fields to define the structure of the records of a database app.
A field belongs to one app. A field is the definition: its name, type and settings. A field value is what one record holds for that field, see Field value.
A "Contacts" app could have the fields "First Name" (Single line text), "Last Name" (Single line text) and "Phone" (Phone). Every record then has values for these fields.
You create, update and delete fields through the app endpoints, see Create and update fields. Responses that return a full app also return its fields.
{
"field_id": 2,
"external_id": "notes",
"slug": "notes",
"label": "Notes",
"type": "text",
"field_type": "multi_text",
"config": {
"label": "Notes",
"slug": "notes",
"external_id": "notes",
"description": "Notes about the contact.",
"show_description": true,
"required": false,
"always_hidden": false,
"hidden_if_empty": false,
"primary": false,
"settings": {
"formatted": true,
"format": "html"
}
}
}
Common properties
All field types share these properties:
| Property | Type | Description | Example value |
|---|---|---|---|
field_id | number | ID of the field. | 2 |
slug | string | Identifier of the field within its app. Tape creates it from the label when you create the field. Renaming the field keeps the slug. Use the field ID or the slug as the key of a field value in record requests. Records return the slug as external_id. | "notes" |
external_id | string | Deprecated. Same as slug, kept for backwards compatibility. Use slug. | "notes" |
label | string | Name of the field in Tape. | "Notes" |
type | string | Kind of data the field holds. See Field type. | "text" |
field_type | string | Exact type of the field. See Field type. | "multi_text" |
config.label | string | Name of the field. Required when you create or update a field. | "Notes" |
config.slug | string | Same as slug. | "notes" |
config.external_id | string | Deprecated. Same as slug, kept for backwards compatibility. Use slug. | "notes" |
config.description | string | Help text of the field. | "Notes about the contact." |
config.show_description (read-only) | boolean | Whether Tape shows the description as help text inside the record. | true |
config.required | boolean | Whether a record needs a value for this field. You can still clear single_text, number, relation, checklist, email, link and phone fields in an update. | false |
config.hidden_if_empty | boolean | Whether Tape hides the field inside the record when it has no value. | false |
config.always_hidden | boolean | Whether Tape hides the field inside the record, even when it has a value. | false |
config.primary | boolean | Whether the field is the primary field of the app. The value of the primary field names a record wherever Tape refers to it. Any field type can be the primary field. An app has at most one primary field, and some apps have none. | false |
config.settings | object | Settings of the field type. The structure depends on field_type. See the page of each field type. | { "formatted": true, "format": "html" } |
Field type
Each field has a field_type and a type. The field_type is the exact type of the field. The type is the kind of data it holds, so several field types share one type.
For field types that can hold one value or several values, the prefix of the field_type says which: single_category holds one option, multi_category holds several.
A single_category field value never has more than one option. Switching a field from single_category to multi_category converts the field and all its values.
field_type | Field in Tape | type |
|---|---|---|
single_text | Single line text | text |
multi_text | Multi line text | text |
single_category | Single select | category |
multi_category | Multiple select | category |
status | Status | category |
single_date | Date | date |
range_date | Date with an end date | date |
number | Number | number |
calculation | Calculation | calculation |
single_relation | Relation to one record | app |
multi_relation | Relation to several records | app |
single_user | Member, one member | contact |
multi_user | Member, several members | contact |
single_attachment | Files, one file | file |
multi_attachment | Files, several files | file |
multi_image | Image | file |
multi_email | email | |
multi_phone | Phone | phone |
multi_link | Link | embed |
checklist | Task list | checklist |
single_location | Location | location |
unique_id | Unique ID | unique_id |
created_on | Created on | created_at |
created_by | Created by | created_by |
last_modified_on | Last edited on | last_modified_at |
last_modified_by | Last edited by | last_modified_by |
When you create a field, send one of these values as field_type. Tape rejects any other value with 400.
Tape fills calculation, unique_id, created_on, created_by, last_modified_on and last_modified_by fields. You can create and configure these fields, but you can't write their values.
Podio field types
Find the Tape field type for each Podio field type. The Podio external_id of a field is the slug in Tape.
| Podio field type | Tape field_type | Note |
|---|---|---|
text | single_text, multi_text | multi_text holds rich text (HTML). |
number | number | |
money | number | No money type. The currency is the field's unit, not part of the value. |
duration | number | No duration type. Store the duration as a number, for example in seconds. |
progress | number | No progress type. Store 0 to 100, for example with the unit %. |
category | single_category, multi_category, status | |
date | single_date, range_date | |
contact | single_user, multi_user | Users of your organization only, guests included. Keep external contacts without a Tape account as records and link them with a relation field. |
app (app reference) | single_relation, multi_relation | |
image | multi_image | |
embed | multi_link | |
location | single_location | |
calculation | calculation | Read-only. |
phone (tel) | multi_phone | |
email | multi_email | |
| Files of an item | single_attachment, multi_attachment | A record has no file list of its own. Add an attachment field. |
The type keeps the Podio names app, contact and embed. New in Tape: status, checklist, unique_id and the fields for creation and last edit.
Create and update fields
Use the create app endpoint to create fields together with a new app. Use the update app endpoint to create new fields in an app, change existing fields or delete fields with fields_to_delete. The page of each field type has a full example.
Find the workspace ID, the app ID and the field IDs in the Developer view of the app.
To change the order of the fields, use Update an app's field order.
General behavior
- A field with
field_idupdates that field. A field withoutfield_idcreates a new field and needs afield_type. - Every field you update needs
config.label, even if the label stays the same. - Send
required,always_hiddenandhidden_if_emptywith every field update. Tape sets the ones you leave out tofalse. A Status field is the exception: withoutrequired, it stays required. - A new
single_textormulti_textfield with adescriptionshows it as help text. A new field of another type starts withshow_descriptionset tofalse. - Send
descriptionwith every field update to show the help text or keep it visible. Withoutdescription, Tape setsshow_descriptiontofalse. Single select, Multiple select and Status fields keep theirshow_descriptionas it is in both cases. - To change one property, read the field first with Retrieve a single app and send back what you keep. A relation field without
settingsloses its linked apps. - Without
primary, Tape makes the first field of a new app the primary field. It skipsunique_id,created_on,created_by,last_modified_onandlast_modified_byfields, unless the request has only fields of these types. Adding fields to an app that has fields leaves its primary field unchanged. - Set
primarytotrueto make a field the primary field. The field that was the primary field before loses the role. In a field update, leaving outprimarykeeps the primary field as it is. - Fields that aren't in the request stay unchanged.
Requirements: apps:edit. Creating an app needs a workspace role that may edit apps in the workspace, updating one needs Full access to the app. Works with a personal access token, an OAuth access token or a user API key.
Errors
- A field update without
config.labelreturns400withinput_validationand a message such asInvalid input: data/fields/0/config must have required property 'label'. - A field update without
configreturns400withvalidation. - A request that sets
primarytotrueon more than one field returns400. - A field update that sets
primarytofalseon the primary field, without a new primary field, returns400. An app with a primary field keeps one.