
## Record

A record belonging to a [table](/developers/scripting/api/table.md) in your [base](/developers/scripting/api/base.md).

Get records in a table using [table.selectRecordsAsync](/developers/scripting/api/table.md#select-records-async) or in a view using
[view.selectRecordsAsync](/developers/scripting/api/view.md#select-records-async) and using the resulting [RecordQueryResult](/developers/scripting/api/recordqueryresult.md).

### id

```js
string
```

The unique ID of this record.

```js
let table = base.getTable("Tasks");
let queryResult = await table.selectRecordsAsync({fields: []});
let record = queryResult.records[0];
console.log(record.id);
```

### getCellValue

> See also: [Field](/developers/scripting/api/field.md)
```js
function (fieldOrIdOrName: Field | string) => unknown;
```

| Parameter name | Description |
|---|---|
| `fieldOrFieldIdOrFieldName` | The [field](/developers/scripting/api/field.md) (or ID or name) whose cell value you want to retrieve. |

Gets a specific cell value in this record. See [cell values & field options](/developers/scripting/api/cell_values.md) for the cell value format for each field type.

```js
let table = base.getTable("Tasks");
let queryResult = await table.selectRecordsAsync({fields: ["Description"]});
let record = queryResult.records[0];
console.log(record.getCellValue("Description"));
```

### getCellValueAsString

> See also: [Field](/developers/scripting/api/field.md)
```js
function (fieldOrIdOrName: Field | string) => string;
```

| Parameter name | Description |
|---|---|
| `fieldOrFieldIdOrFieldName` | The [field](/developers/scripting/api/field.md) (or ID or name) whose cell value you want to retrieve. |

Gets a specific cell value in this record, formatted as a `string`.

```js
let table = base.getTable("Tasks");
let queryResult = await table.selectRecordsAsync({fields: ["Priority"]});
let record = queryResult.records[0];
console.log(record.getCellValueAsString("Priority"));
```

### name

```js
string
```

The primary cell value as a string, or 'Unnamed record' if primary cell value is empty.
