Check that a field's stored values convert to another type.
Asks, as the template editor does before a type change, whether every value stored in the field converts to the type; update_custom_field_template refuses the change when one does not. Nothing is changed and no value is shown. Types that store text convert nothing, so the answer is can_change true with converts_values false. Needs Edit Custom Field Templates, as the template editor does.
| |
|---|
| Scope | custom_fields:read |
| Asynchronous | No |
| MCP tool | check_custom_field_type |
| Portal permissions | edit_custom_field_templates |
Parameters
| Name | In | Type | Required | Description |
|---|
custom_field_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Request body
Responses
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
FieldTypeCheck
| Field | Type | Required | Description |
|---|
can_change | boolean | Required | Whether the change can be made: every stored value converts, or none needs to. |
converts_values | boolean | Required | Whether the change converts the values stored in the field (a change to a number, currency, date or register reference does; to a text type it does not). |
custom_field_id | string | Required | |
reason | string or null | Required | Why it cannot: values_do_not_convert (a stored value does not convert; change or clear those values first) or column_missing (the field's column is missing from its register's table). Null when it can. |
type | string | Required | |
| Field | Type | Required | Description |
|---|
type | string | Required | The type to change the field to, as a field definition names it (numeric, currency, whole_number, date, date_time ...). |