2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Modify table
|
|
|
|
Changes the name and/or description of the base
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function ModifyTable(Val Token, Val Base, Val Table, Val Name = "", Val Description = "") Export`
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Base | --base | String | Base identifier |
|
|
|
|
| Table | --table | String | Table identifier |
|
|
|
|
| Name | --title | String | New name |
|
|
|
|
| Description | --description | String | New description |
|
|
|
|
|
|
|
|
|
2024-06-06 14:33:52 +02:00
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-07-10 13:05:58 +02:00
|
|
|
<br/>
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
```bsl title="Code example"
|
2024-07-10 13:24:11 +02:00
|
|
|
|
|
|
|
Base = "apptm8Xqo7TwMaipQ";
|
2024-06-05 12:19:46 +02:00
|
|
|
Table = "tbl9G4jVoTJpxYwSY";
|
|
|
|
Name = "Test table 2 (change.)";
|
|
|
|
Description = "New table (change.)";
|
|
|
|
|
|
|
|
Response = OPI_Airtable.ModifyTable(Token, Base, Table, Name, Description); //Map
|
|
|
|
Response = OPI_Tools.JSONString(Response); //JSON string
|
|
|
|
```
|
2024-07-10 10:59:55 +02:00
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint airtable ModifyTable --token %token% --base "apptm8Xqo7TwMaipQ" --table "tbl9G4jVoTJpxYwSY" --title "Test table 2 (change.)" --description "New table (change.)"
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-07-10 13:11:17 +02:00
|
|
|
{
|
2024-06-05 12:19:46 +02:00
|
|
|
"id": "tblT64aWyrMUAbUmF",
|
|
|
|
"name": "Test table 2 (change.)",
|
|
|
|
"description": "New table (change.)",
|
|
|
|
"primaryFieldId": "fldoHs3kv6RLc8pjo",
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"id": "fldoHs3kv6RLc8pjo",
|
|
|
|
"name": "Number",
|
|
|
|
"type": "number",
|
|
|
|
"options": {
|
|
|
|
"precision": 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "fldzY5xRHDY7ClKxa",
|
|
|
|
"name": "String",
|
|
|
|
"type": "richText"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "fldYHxxXPALKl3yHp",
|
|
|
|
"name": "Attachment",
|
|
|
|
"type": "multipleAttachments",
|
|
|
|
"options": {
|
|
|
|
"isReversed": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "fldRUoggUObfqckXh",
|
|
|
|
"name": "Checkbox",
|
|
|
|
"type": "checkbox",
|
|
|
|
"options": {
|
|
|
|
"icon": "check",
|
|
|
|
"color": "yellowBright"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "fldvtwjapJM7s99nN",
|
|
|
|
"name": "Date",
|
|
|
|
"type": "date",
|
|
|
|
"options": {
|
|
|
|
"dateFormat": {
|
|
|
|
"name": "iso",
|
|
|
|
"format": "YYYY-MM-DD"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "flda4VY8dVd2mbqz9",
|
|
|
|
"name": "Phone",
|
|
|
|
"type": "phoneNumber"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "fld8ZLKndqBIkT72s",
|
|
|
|
"name": "Email",
|
|
|
|
"type": "email"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "fldqjsCp1c2KaAS53",
|
|
|
|
"name": "Link",
|
|
|
|
"type": "url"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"views": [
|
|
|
|
{
|
|
|
|
"id": "viwX3vEGO5vB2Km4k",
|
|
|
|
"name": "Grid view",
|
|
|
|
"type": "grid"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|