2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Create comment
|
|
|
|
Creates a comment for a record in the table
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function CreateComment(Val Token, Val Base, Val Table, Val Record, Val Text) Export`
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Base | --base | String | Database identifier |
|
|
|
|
| Table | --table | String | Table identifier |
|
|
|
|
| Record | --record | String | Record identifier in the table |
|
|
|
|
| Text | --text | String | Comment text |
|
|
|
|
|
|
|
|
|
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:11:17 +02:00
|
|
|
Base = "apptm8Xqo7TwMaipQ";
|
2024-06-05 12:19:46 +02:00
|
|
|
Table = "tbl9G4jVoTJpxYwSY";
|
|
|
|
Record = "recV6DxeLQMBNJrUk";
|
|
|
|
Text = "TestComment";
|
|
|
|
|
|
|
|
Response = OPI_Airtable.CreateComment(Token, Base, Table, Record, Text); //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 CreateComment --token %token% --base "apptm8Xqo7TwMaipQ" --table "tbl9G4jVoTJpxYwSY" --record "recV6DxeLQMBNJrUk" --text "TestComment"
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-07-10 13:11:17 +02:00
|
|
|
{
|
2024-06-05 12:19:46 +02:00
|
|
|
"id": "comL1oGEDJvIQlMs1",
|
|
|
|
"author": {
|
|
|
|
"id": "usrFlaAHlTfYWAbVW",
|
|
|
|
"email": "bayselonarrend@gmail.com",
|
|
|
|
"name": "Anton Titovets"
|
|
|
|
},
|
|
|
|
"text": "TestComment",
|
|
|
|
"createdTime": "2024-05-10T19:39:51.561Z",
|
|
|
|
"lastUpdatedTime": null
|
|
|
|
}
|
|
|
|
```
|