1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-23 12:18:48 +02:00

50 lines
1.0 KiB
Markdown
Raw Normal View History

---
sidebar_position: 1
---
# Create field
Creates a new field in the table
2024-07-10 13:58:29 +03:00
`Function CreateField(Val Token, Val Base, Val Table, Val FieldStructure) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| Base | --base | String | Base identifier |
| Table | --table | String | Table identifier |
| FieldStructure | --fielddata | Structure of KeyAndValue | Description of the new field |
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-10-02 20:28:02 +03:00
Token = "patNn4BXW66Yx3pdj.5b93c53cab554a8387de02d...";
2024-10-15 10:07:27 +03:00
Base = "appESy99HYCLbuWlV";
Table = "tbl5gZLQ8i5xKuVTy";
2024-10-02 20:28:02 +03:00
Name = String(New UUID);
Field = OPI_Airtable.GetNumberField(Name);
Result = OPI_Airtable.CreateField(Token, Base, Table, Field);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-10-03 09:45:14 +03:00
{
"type": "number",
"options": {
"precision": 0
},
2024-10-09 09:42:00 +03:00
"id": "fldDqI1OXajeQw5Gg",
"name": "b3fd1280-83b2-4145-838d-3437b14adee3"
2024-10-03 09:45:14 +03:00
}
```