[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FIELD()/FIELDNAME()
FIELD() returns the field name of a specified field in the current
database file.
Syntax
FIELD(<expN>)/FIELDNAME(<expN>)
Argument
<expN> is the numeric position of a field in the database file
structure.
Returns
A character string.
If <expN> is not within the range of the fields contained in the
current database file, FIELD() returns a null string ("").
Fieldnames are returned all upper case.
Usage
FIELD() permits a database file structure to be handled as if it is an
array, each field number a subscript pointer to the fieldname. This
array of fields is useful for building data-independent programs for
import/export and reporting.
If you need other database file structure information, use TYPE() and
LEN(). If you need the number of decimal places a numeric field has
defined, use the following expression:
LEN(SUBSTR(STR(<field>), RAT(".", STR(<field>)) + 1))
Note: AFIELDS() provides similar but expanded capability for
manipulating field attribute information.
See Also:
AFIELDS
FCOUNT
LASTREC()
TYPE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson