Skip to main content

Create field

Creates a new field in the table

Function CreateField(Val Token, Val Base, Val Table, Val FieldStructure) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Base--baseStringBase identifier
Table--tableStringTable identifier
FieldStructure--fielddataStructure Of KeyAndValueDescription of the new field

Returns: Map Of KeyAndValue - serialized JSON response from Airtable


1C:Enterprise/OneScript code example
    Token = "patNn4BXW66Yx3pdj.5b93c53cab554a8387de02d...";
Base = "appaKLx2yhnY45n6b";
Table = "tblwLZErQh3D39If3";
Name = String(New UUID);

Field = OPI_Airtable.GetNumberField(Name);
Result = OPI_Airtable.CreateField(Token, Base, Table, Field);
    oint airtable CreateField \
--token "***" \
--base "appUHJhiJ9eMFouSg" \
--table "tbl0Cgy9AVXbpuuqH" \
--fielddata "{'name':'b7bac892-9d6a-4a28-afc9-1bfaccbca053','type':'number','options':{'precision':'0'}}"
Result
{
"type": "number",
"options": {
"precision": 0
},
"id": "fldpyEz4pev32XZPi",
"name": "b7bac892-9d6a-4a28-afc9-1bfaccbca053"
}