Skip to main content

FindPrior

function FindPrior: Boolean;

Example

procedure FindPreviousMatch(const Data: TvxClientDataSet; var Found: Boolean);
begin
Found := Data.FindPrior;
end;

Usage

FindPrior continues a dataset filter search backward and moves to the preceding matching record.

  • Use only with a bidirectional dataset and a deliberate filter.
  • Normally establish the reverse search with FindLast.
  • Handle false and explicitly restore cursor position if required.

Additional Technical Info

FindPrior is declared by hidden ancestor TDataSet and is normally used through a visible descendant such as TvxClientDataSet. It is the reverse continuation partner to FindNext.

Source-backed behaviour

Base modified TDataSet.FindRecord is a false-return stub. TCustomClientDataSet synchronizes/reuses its find cursor, moves one record backward with the current filter, and resynchronizes the dataset on success.

A unidirectional dataset cannot support backward cursor work; the concrete implementation can raise or remain unsupported. Pending edits are resolved first.

FindLast restarts backward. Prior moves one physical visible record without a separate find criterion.

Official RTL references

Created 2026-07-15