ORDSETFOCUS()
Set focus to an Order in an Order List
- Syntax
-
- ORDSETFOCUS([<cOrderName> | <nOrder>]
- [,<cOrderBagName>]) --> cPrevOrderNameInFocus
- Arguments
-
- <cOrderName> is the name of the selected Order, a logical ordering of a database. ORDSETFOCUS() ignores any invalid values of <cOrderName>.
- <nOrder> is a number representing the position in the Order List of the selected Order.
- <cOrderBagName> is the name of a disk file containing one or more Orders. You may specify <cOrderBagName> as the filename with or without the pathname or appropriate extension. If you do not include the extension as part of <cOrderBagName> HARBOUR uses the default extension of the current RDD.
- Returns
-
- ORDSETFOCUS() returns the Order Name of the previous controlling Order.
- Description
-
- ORDSETFOCUS() is an Order management function that returns the Order Name of the previous controlling Order and optionally sets the focus to an new Order.
- If you do not specify <cOrderName> or <nOrder>, the name of the currently controlling order is returned and the controlling order remains unchanged.
- All Orders in an Order List are properly updated no matter what <cOrderName> is the controlling Order. After a change of controlling Orders, the record pointer still points to the same record.
- The active RDD determines the Order capacity of an Order Bag. The default DBFNTX driver only supports single-Order Bags, while other RDDs may support multiple-Order Bags (e.g., the DBFCDX and DBPX drivers).
- ORDSETFOCUS() supersedes INDEXORD().
Examples
USE Customer VIA "DBFNTX" NEW
SET INDEX TO CuAcct, CuName, CuZip
? ORDSETFOCUS( "CuName" ) // Displays: "CuAcct"
? ORDSETFOCUS() // Displays: "CuName"
Tests
- Status
- Started
- Compliance
-
- Platforms
-
- All
- Files
-
- Library is rdd