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 file name with or without the path name or appropriate extension. If you do not include the extension as part of <cOrderBagName>, Clipper 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). Note: ORDSETFOCUS() supersedes INDEXORD(). Examples USE Customer VIA "DBFNTX" NEW SET INDEX TO CuAcct, CuName, CuZip ? ORDSETFOCUS("CuName") // Displays: "CuAcct" ? ORDSETFOCUS() // Displays: "CuName"
See Also: SET INDEX SET ORDER
Pingback: C5DG-3 RDD Reference | Viva Clipper !