Function OrdBagName() Foundation
Returns the filename of the file containing an index.
OrdBagName( <nIndex> | <cTagName>, [<nInfo>] ) --> cIndexFile
Constant | Description |
---|---|
DMLB_FILENAME | Function returns file name. |
DMLB_QUALIFIED_FILENAME | Function returns file name including path. |
The return value of OrdBagName() is a character string containing the file name of the index file containing the specified index. When no index is active, a null string ("") is returned.
The index function OrdBagName() determines which index of a work area is managed in which index file. When the function is used without the alias operator, it returns the filename for the current work area.
// The example shows the return values of OrdBagName() after
// index files were opened with the command SET INDEX TO.
PROCEDURE Main
USE Customer NEW
SET INDEX TO CustA, CustB, CustC
? OrdBagName(1) // result: CustA
? OrdBagName(2) // result: CustB
? OrdBagName(3) // result: CustC
? OrdBagName(4) // result: (null string (""))
CLOSE Customer
RETURN
// The example shows the return values of OrdBagName() after
// index files were opened with the function OrdListAdd().
PROCEDURE Main
USE Customer NEW
OrdCreate( "CustA", "CustNo", "CUSTNO" )
OrdCreate( "CustB", "CustName", "Upper(LASTNAME+FIRSTNAME)")
OrdCreate( "CustC", "Zipcode", "ZIP" )
OrdListClear()
OrdListAdd("CustA")
OrdListAdd("CustB")
OrdListAdd("CustC")
? OrdBagName("CustNo") // result: CustA
? OrdBagName("CustName") // result: CustB
? OrdBagName("Zipcode") // result: CustC
CLOSE Customer
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.