Updates the metadata of the specified table column on a NocoDB server via its
PATCH /api/v2/meta/columns/{id_col}
API endpoint.
Beware that this API endpoint alters the schema of the underlying table, which might be undesirable, especially if the table is from an external data source.
Usage
update_tbl_col(
id_col,
column_name = NULL,
title = NULL,
description = NULL,
uidt = NULL,
dt = NULL,
cdf = NULL,
hostname = pal::pkg_config_val("hostname"),
email = pal::pkg_config_val("email"),
password = pal::pkg_config_val("password"),
api_token = pal::pkg_config_val("api_token")
)
Arguments
- id_col
NocoDB column identifier as returned by
tbl_col_id()
. A character scalar.- column_name
Column name. Either
NULL
to omit or a character scalar.- title
NocoDB column title. Either
NULL
to omit or a character scalar.- description
NocoDB column description displayed as a tooltip in the column header. Either
NULL
to omit or a character scalar.- uidt
NocoDB user interface data type. Either
NULL
to omit or one of"Attachment"
"AutoNumber"
"Barcode"
"Button"
"Checkbox"
"Collaborator"
"Count"
"CreatedBy"
"CreatedTime"
"Currency"
"Date"
"DateTime"
"Decimal"
"Duration"
"Email"
"ForeignKey"
"Formula"
"GeoData"
"Geometry"
"ID"
"JSON"
"LastModifiedBy"
"LastModifiedTime"
"Links"
"LinkToAnotherRecord"
"LongText"
"Lookup"
"MultiSelect"
"Number"
"Percent"
"PhoneNumber"
"QrCode"
"Rating"
"Rollup"
"SingleLineText"
"SingleSelect"
"SpecificDBType"
"Time"
"URL"
"User"
"Year"
.
- dt
Column data type. Either
NULL
to omit or a character scalar.- cdf
Column default value. Either
NULL
to omit or a character scalar.- hostname
NocoDB server hostname. A character scalar.
E-mail address of the NocoDB user to authenticate with.
- password
Password of the NocoDB user to authenticate with.
- api_token
NocoDB API token. Takes precedence over
email
andpassword
if provided.
Value
A tibble with metadata about the NocoDB table to which the updated column belongs, invisibly.
See also
Other functions to manage NocoDB table columns:
create_tbl_col()
,
delete_tbl_col()
,
set_display_val()
,
set_display_vals()
,
tbl_col()
,
tbl_col_id()
,
tbl_cols()