# FIELDNAME()

Return the name of a field at a numeric field location.

Syntax

  FIELDNAME/FIELD(<nPosition>) --> cFieldName

Arguments

  <nPosition> Field order in the database.

Returns

  <cFieldName> returns the field name.

Description

  This function return the name of the field at the <nPosition>th position. If the numeric value passed to this function does not correspond to an existing field in the designated or selected work area,this function will return a NULL byte.

Examples

          FUNCTION Main()
            LOCAL x
            USE Tests NEW
            FOR x := 1 to Tests->(FCOUNT())
              ? "Field Name",FieldName(x)
            NEXT
            USE
          RETURN Nil

Status

  Ready

Compliance

  This function is CA-Clipper compatible.

Files

  Library is rdd

See Also

- DBSTRUCT()
- FCOUNT()
- LEN()
- VALTYPE()