Skip to main content
Records

Calculation field value

Request
curl https://api.tapeapp.com/v1/record/1 \
-H "Authorization: Bearer $TAPE_TOKEN"
Response
{
"record_id": 1,
"title": "Juliet Adams",
"fields": [
{
"field_id": 4,
"external_id": "vacation_days_left",
"label": "Vacation Days Left",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": 12,
"value_string": "12",
"decimal": 12,
"start": null,
"start_utc": null,
"start_date": null,
"start_date_utc": null,
"start_time": null,
"start_time_utc": null
}
]
},
{
"field_id": 5,
"external_id": "next_review",
"label": "Next Review",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": "2026-12-01 09:00",
"value_string": "2026-12-01 09:00",
"decimal": null,
"start": "2026-12-01 09:00:00",
"start_utc": "2026-12-01 08:00:00",
"start_date": "2026-12-01",
"start_date_utc": "2026-12-01",
"start_time": "09:00:00",
"start_time_utc": "08:00:00"
}
]
},
{
"field_id": 6,
"external_id": "profile_link",
"label": "Profile Link",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": "<a href='https://acme.com/team/juliet' target='_blank'>Team profile</a>",
"value_string": "<a href='https://acme.com/team/juliet' target='_blank'>Team profile</a>",
"decimal": null,
"start": null,
"start_utc": null,
"start_date": null,
"start_date_utc": null,
"start_time": null,
"start_time_utc": null
}
]
}
]
}

Use a calculation field value to read the computed value of a record.

Tape computes the value of a calculation field from its script. The value is text, a number or a date, depending on the return_type of the field. Text can be plain text or rich text with Markdown or HTML.

Calculation field value object
{
"field_id": 4,
"external_id": "vacation_days_left",
"label": "Vacation Days Left",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": 12,
"value_string": "12",
"decimal": 12,
"start": null,
"start_utc": null,
"start_date": null,
"start_date_utc": null,
"start_time": null,
"start_time_utc": null
}
]
}

typestring

"calculation".

Example value "calculation"

field_typestring

"calculation".

Example value "calculation"

values[].valuestring or number

The computed value. A string for text, a number for numbers, the date as text for dates.

Example value 12

values[].value_stringstring

The value as text. For numbers, with the decimal places and the unit of the field.

Example value "12"

values[].decimalnumber or null

Number results only. The number. null otherwise.

Example value 12

values[].startstring or null

Date results only. Date and time in your timezone. null otherwise.

Example value "2026-12-01 09:00:00"

values[].start_datestring or null

Date results only. The date in your timezone. null otherwise.

Example value "2026-12-01"

values[].start_timestring or null

Date results only. The time in your timezone. null for a date without time and for other results.

Example value "09:00:00"

values[].start_utc, values[].start_date_utc, values[].start_time_utcstring or null

Date results only. The same values in UTC. null otherwise.

Example value "2026-12-01 08:00:00"

Each field in a record response also contains the field's config. The examples on this page leave it out.

Record retrieval​

Use the retrieve record endpoint to read the calculation values of a record.

GET/v1/record/{record_id}api.tapeapp.com
Request
curl https://api.tapeapp.com/v1/record/1 \
-H "Authorization: Bearer $TAPE_TOKEN"
Response
{
"record_id": 1,
"title": "Juliet Adams",
"fields": [
{
"field_id": 4,
"external_id": "vacation_days_left",
"label": "Vacation Days Left",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": 12,
"value_string": "12",
"decimal": 12,
"start": null,
"start_utc": null,
"start_date": null,
"start_date_utc": null,
"start_time": null,
"start_time_utc": null
}
]
},
{
"field_id": 5,
"external_id": "next_review",
"label": "Next Review",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": "2026-12-01 09:00",
"value_string": "2026-12-01 09:00",
"decimal": null,
"start": "2026-12-01 09:00:00",
"start_utc": "2026-12-01 08:00:00",
"start_date": "2026-12-01",
"start_date_utc": "2026-12-01",
"start_time": "09:00:00",
"start_time_utc": "08:00:00"
}
]
},
{
"field_id": 6,
"external_id": "profile_link",
"label": "Profile Link",
"type": "calculation",
"field_type": "calculation",
"values": [
{
"value": "<a href='https://acme.com/team/juliet' target='_blank'>Team profile</a>",
"value_string": "<a href='https://acme.com/team/juliet' target='_blank'>Team profile</a>",
"decimal": null,
"start": null,
"start_utc": null,
"start_date": null,
"start_date_utc": null,
"start_time": null,
"start_time_utc": null
}
]
}
]
}

The example reads an employee record with three calculation fields: "Vacation Days Left" returns a number, "Next Review" a date and "Profile Link" HTML.

General behavior

  • Tape computes calculation values. It ignores them in create and update requests and returns no error. See Read-only field values.
  • A calculation that never had a result isn't in fields. One whose result became empty, for example after you clear a value it uses, stays in fields with an empty values array.
  • A number result of 0 also comes back with an empty values array.
  • Tape computes the result after the write. The response to a create or update can still show the previous result, so read the record again for the new one.
  • For a date result, value holds the date and the time without seconds.

Requirements: records:read. Works with a personal access token, an OAuth access token or a user API key.

Errors

Reading calculation values has no field-specific errors. See Errors for all error codes.

Next steps​