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,
origin = pal::pkg_config_val("origin"),
email = pal::pkg_config_val("email"),
password = pal::pkg_config_val("password"),
api_token = pal::pkg_config_val("api_token")
)
Arguments
- id_col
character(1)
NocoDB column identifier as returned bytbl_col_id()
.- column_name
character(1)
Column name. Omitted ifNULL
.- title
character(1)
NocoDB column title. Omitted ifNULL
.- description
character(1)
NocoDB column description displayed as a tooltip in the column header. Omitted ifNULL
.- uidt
character(1)
NocoDB user interface data type. EitherNULL
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
character(1)
Column data type. Omitted ifNULL
.- cdf
character(1)
Column default value. Omitted ifNULL
.- origin
character(1)
NocoDB server origin.character(1)
E-mail address of the NocoDB user to authenticate with.- password
character(1)
Password of the NocoDB user to authenticate with.- api_token
character(1)
NocoDB API token. Takes precedence overemail
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()