GOTO
Purpose
Position to a specific record in a table
Syntax
GO[TO] [RECORD] <expN> | BOTTOM | TOP [IN <alias>]
See Also
BOF(), EOF(), FOUND(), GOTO(), KEYMATCH(), LOOKUP(), LASTREC(), LOCATE, RECCOUNT(), RECNO(), RLOOKUP(), SEEK, SEEK(), SET DELETED, SET RELATION, SKIP
Description
The GOTO command is used to position the record pointer to the specified record in a table. The pointer is moved to the record whose number matches that specified in <expN>. By default, the GOTO command operates in the currently selected workarea. If the number specified in <expN> is not a valid record number, a 'Record is out of range' error message will be given.
BOTTOM
If the BOTTOM keyword is specified, then the record pointer is positioned to the last record in the table.
TOP
If the TOP keyword is specified, then the record pointer is positioned to the first record in the table.
IN <alias>
The IN <alias> clause is used to move the record pointer of an open table in another workarea.
If the command SET PCFILTER is ON, then the use of GOTO <expN> bypasses any FILTER <condition> that may be in effect with the SET FILTER TO command. The record pointer may be positioned to records that are marked for deletion, even if SET DELETED is ON. If SET RELATION TO is in effect for the active table, then defined relationships are maintained after the record pointer is positioned.
Example
goto top browse goto 10