Record
To get the specific data of the record, query single or all records can use the Datasheet API's getRecordAsync (query single record data), getRecordsAsync (bulk query record data).
record.Record
Parameters
id
• get
id(): string
Record ID
Returns
string
Example
console.log(myRecord.id);
// => 'recxxxxxx'
___
### title
• `get` **title**(): ``null`` \| `string`
The string value of the cell in the first field.The first field is usually considered the main field.
#### Returns
``null`` \| `string`
#### Example
```js
console.log(myRecord.title);
// => '42'
commentCount
• get
commentCount(): number
Number of record's comments
Returns
number
Example
console.log(myRecord.commentCount); // => 10
## Method
### getCellValue
▸ **getCellValue**(`fieldId`): `any`
Get the specified cell value in the Record
#### Parameters
| Name | Type | Description |
| :-------- | :------- | :---------- |
| `fieldId` | `string` | Field ID |
#### Returns
`any`
#### Example
```js
const cellValue = myRecord.getCellValue(mySingleLineTextFieldId);
console.log(cellValue); // => 'cell value'
getCellValueString
▸ getCellValueString(fieldId
): null
| string
Gets the cell value of the given field of record, and convert to string type.
Parameters
Name | Type |
---|---|
fieldId | string |
Returns
null
| string
Example
const stringValue = myRecord.getCellValueString(myNumberFieldId);
console.log(stringValue); // => '42'
getUrl
▸ getUrl(viewId?
): string
The URL of the record
Parameters
Name | Type |
---|---|
viewId? | string |
Returns
string
Example
console.log(myRecord.getUrl('viwxxxxxx')); // => '42'
// => 'https://aitable.ai/workbench/dstxxxxxx/viwxxxxxx/recxxxxxx'