Creates the specified table column on a NocoDB server via its
POST /api/v2/meta/tables/{id_tbl}/columns
API endpoint.
Usage
create_tbl_col(
id_tbl,
column_name,
title = column_name,
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_tbl
NocoDB table identifier as returned by
tbl_id()
. A character scalar.- column_name
Column name. A character scalar.
- title
NocoDB column title. 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 newly created NocoDB table column, invisibly.
See also
Other functions to manage NocoDB table columns:
delete_tbl_col()
,
set_display_val()
,
set_display_vals()
,
tbl_col()
,
tbl_col_id()
,
tbl_cols()
,
update_tbl_col()