Function OrdKeyNo() Foundation
Determines the relative logical record number of the current data record within the indexed database.
OrdKeyNo( [<nIndex> | <cTagName>] ) --> nRelativeRecord
The return value of OrdKeyNo() is a numeric value indicating the relative position of the record pointer within the indexed database. If no index is available, the function returns zero.
When an index is active in a work area, the data records are logically sorted and are no longer accessed in physical order. In this case, the function Recno() cannot be used to indicate the position of the record pointer relative to the first data record. As an example, when logically sorted the data record with Recno()=100 might be the first data record. The function OrdKeyNo() serves to determine the relative position of the record pointer in relation to the first logical (not physical) data record.
The function OrdKeyNo() is similar to Recno(). However, OrdKeyNo() determines the position of the record pointer based on the index file containing the controlling (current) index. OrdKeyNo() always returns a numeric value. The function Recno(), on the other hand, returns the identity of a data record which may not be represented by a numeric value. The return value of OrdKeyNo() is used only for display purposes, such as to visually show the relative position of the record pointer.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.