1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-07-05 00:58:52 +02:00
Files
OpenIntegrations/docs/en/md/Airtable/Working-with-fields/Create-field.mdx

81 lines
2.2 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 1
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Create field
Creates a new field in the table
`Function CreateField(Val Token, Val Base, Val Table, Val FieldStructure) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | 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 |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-10-15 10:16:04 +03:00
Token = "patNn4BXW66Yx3pdj.5b93c53cab554a8387de02d...";
2024-12-02 18:50:41 +03:00
Base = "appg0JsjPu7GsCRR2";
Table = "tbltNIWr0Gr9ulL5x";
2024-10-15 10:16:04 +03:00
Name = String(New UUID);
Field = OPI_Airtable.GetNumberField(Name);
Result = OPI_Airtable.CreateField(Token, Base, Table, Field);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
2024-10-22 08:59:24 +03:00
# JSON data can also be passed as a path to a .json file
2024-10-20 22:36:03 +03:00
oint airtable CreateField \
2024-10-22 08:59:24 +03:00
--token "***" \
2024-12-08 12:04:47 +03:00
--base "appt76fsk3DQMaLD6" \
--table "tblsaBKXHBgokqeHI" \
--title "87e8bb5e-f04c-4008-9d85-449474535216" \
--fielddata "{'name':'87e8bb5e-f04c-4008-9d85-449474535216','type':'number','options':{'precision':0}}"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
2024-10-22 08:59:24 +03:00
:: JSON data can also be passed as a path to a .json file
2024-10-20 22:36:03 +03:00
oint airtable CreateField ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2024-12-08 12:04:47 +03:00
--base "appt76fsk3DQMaLD6" ^
--table "tblsaBKXHBgokqeHI" ^
--title "87e8bb5e-f04c-4008-9d85-449474535216" ^
--fielddata "{'name':'87e8bb5e-f04c-4008-9d85-449474535216','type':'number','options':{'precision':0}}"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"type": "number",
"options": {
"precision": 0
},
"id": "fldDqI1OXajeQw5Gg",
"name": "b3fd1280-83b2-4145-838d-3437b14adee3"
}
```