ORDNUMBER() Return the position of an order in the current order list ------------------------------------------------------------------------------ Syntax ORDNUMBER(<cOrderName>[, <cOrderBagName>]) --> nOrderNo Arguments <cOrderName> the name of the specific order whose position in the order list is sought. <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 ORDNUMBER() returns an integer that represents the position of the specified order in the order list. Description ORDNUMBER() is an order management function that lets you determine the position in the current order list of the specified order. ORDNUMBER() searches the order list in the current work area and returns the position of the first order that matches <cOrderName>. If <cOrderBagName> is the name of an order bag newly emptied into the current order list, only those orders in the order list that have been emptied from <cOrderBagName> are searched. If <cOrderName> is not found, ORDNUMBER() raises a recoverable runtime error. 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). Examples USE Customer VIA "DBFNTX" NEW SET INDEX TO CuAcct, CuName, CuZip ORDNUMBER("CuName") // Returns: 2
Pingback: C5DG-3 RDD Reference | Viva Clipper !