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 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

Returns nOrderNo, 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
Tests

Status

Started

Compliance


Platforms

All

Files

Library is rdd

See Also