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,
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_tbl
character(1)
NocoDB table identifier as returned bytbl_id()
.- column_name
character(1)
Column name.- title
character(1)
NocoDB column title.- 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 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()