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

# Dataset.Next

## Declaration

`procedure Next;`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  while not DATASET.EOF do
begin
LogInfo('Do something with the record');
DATASET.Next; //move to the next record
end;
end;
```

## Description

Moves to the next 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.
