OrdKeyGoto Function | |
Move to a record specified by its logical record number in the controlling order.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION OrdKeyGoto(
nKeyNo
) AS LOGIC CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static bool OrdKeyGoto(
Usual nKeyNo = default
)
Request Example
View SourceParameters
- nKeyNo (Optional)
- Type: Usual
The logical record number.
If the value specified does not satisfy the scope or for condition for the order, the record pointer is positioned at the end-of-file.
Return Value
Type:
Logic
TRUE if successful; otherwise, FALSE.
Remarks
OrdKeyGoTo() is the complement to OrdKeyNo(). OrdKeyNo() returns the logical record number (i.e., its position in the controlling order) of the current record, and OrdKeyGoTo() moves the record pointer to the specified logical record.
Tip:
This function can be useful when displaying scroll bars.
If the user clicks on a certain position on the scroll bar, you can move to the corresponding record by calling OrdKeyGoTo().
By default, this function operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying
it within an aliased expression
Examples
This example shows the difference between physical and logical record number:
1USE customer
2SET INDEX TO first
3
4OrdKeyGoTo(100)
5? RECNO()
6
7? OrdKeyNo()
8
See Also