Skip to content

Flow documentation · legacy product

Dataset.RecordPosition ​

Declaration ​

property RecordPosition: cardinal

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
var PreviousPosition : cardinal;
begin
PreviousPosition := DATASET.RecordPosition; //store the current position in the dataset
if DATASET.Find('Field1', '123') then
LogInfo('Do something with the found record');
DATASET.RecordPosition := PreviousPosition; //return to the previous position in the dataset
end;

Description ​

Returns the current position in the dataset. Set this to a number to move to the record at that position. Allows you to jump around the dataset.

Records are a zero based array, therefore 0 represents the first record. If you set RecordPosition to 9 you will move to the 10th record.

If you set RecordPosition to a number outside the range of records you will receive an error during execution of the script. Use Dataset.RecordCount to determine that the highest record number is. Max Record Position = RecordCount - 1 (due to zero based array)