﻿---
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Modify table
 Changes the name and/or description of the base



`Function ModifyTable(Val Token, Val Base, Val Table, Val Name = "", Val Description = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | Base | --base | String | &#x2714; | Base identifier |
  | Table | --table | String | &#x2714; | Table identifier |
  | Name | --title | String | &#x2716; | New name |
  | Description | --description | String | &#x2716; | New description |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Airtable

<br/>




```bsl title="1C:Enterprise/OneScript code example"
    Token       = "patNn4BXW66Yx3pdj.5b93c53cab554a8387de02d...";
    Base        = "appL0hdxXVnQkbPVh";
    Table       = "tblEGswvf7vDCgFHd";
    Name        = "Test table 2 (change.)";
    Description = "New table (change.)";

    Result = OPI_Airtable.ModifyTable(Token, Base, Table, Name, Description);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint airtable ModifyTable \
             --token "***" \
             --base "appEQjBhFBRg8WSBM" \
             --table "tblnwXhP3ZlwodcWm" \
             --title "Test table 2 (change.)" \
             --description "New table (change.)"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint airtable ModifyTable ^
             --token "***" ^
             --base "appEQjBhFBRg8WSBM" ^
             --table "tblnwXhP3ZlwodcWm" ^
             --title "Test table 2 (change.)" ^
             --description "New table (change.)"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "id": "tbl1ECxOLd4V6OM9T",
 "name": "Test table 2 (change.)",
 "description": "New table (change.)",
 "primaryFieldId": "fldhWwOjg9UhvJ6A2",
 "fields": [
  {
   "id": "fldhWwOjg9UhvJ6A2",
   "name": "Number",
   "type": "number",
   "options": {
    "precision": 0
   }
  },
  {
   "id": "fld8KaCe62SjwSYAk",
   "name": "String",
   "type": "richText"
  },
  {
   "id": "fldSWB4hUUyP5Hx30",
   "name": "Attachment",
   "type": "multipleAttachments",
   "options": {
    "isReversed": false
   }
  },
  {
   "id": "fld7UipYF2w9FsoRm",
   "name": "Checkbox",
   "type": "checkbox",
   "options": {
    "icon": "check",
    "color": "yellowBright"
   }
  },
  {
   "id": "fldHVbDsv6ndNp2XZ",
   "name": "Date",
   "type": "date",
   "options": {
    "dateFormat": {
     "name": "iso",
     "format": "YYYY-MM-DD"
    }
   }
  },
  {
   "id": "fldYL0IFRMVQCO7gW",
   "name": "Phone",
   "type": "phoneNumber"
  },
  {
   "id": "fldzsmOGCGjThDsUp",
   "name": "Email",
   "type": "email"
  },
  {
   "id": "fldMWVcVuR9CmKBcD",
   "name": "Link",
   "type": "url"
  }
 ],
 "views": [
  {
   "id": "viwMlZ7T3KyjEufmW",
   "name": "Grid view",
   "type": "grid"
  }
 ]
}
```
