---
url: /flow/guide/scripting-reference/classes/data-set/dataset.last.md
---

# Dataset.Last

## Declaration

`procedure Last;`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
DATASET.Last; //move to the last record
end;
```

## Description

Moves to the last record in the dataset and makes this the active record. Also refer to [Dataset.RecordPosition](/flow/guide/scripting-reference/classes/data-set/dataset.recordposition) for moving to a specific record.
