[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FIELDPOS()
 Return the position of a field in a work area
------------------------------------------------------------------------------
 Syntax

     FIELDPOS(<cFieldName>) --> nFieldPos

 Arguments

     <cFieldName> is the name of a field in the current or specified work
     area.

 Returns

     FIELDPOS() returns the position of the specified field within the list
     of fields associated with the current or specified work area.  If the
     current work area has no field with the specified name, FIELDPOS()
     returns zero.

 Description

     FIELDPOS() is a database function that is the inverse of the FIELDNAME()
     function.  FIELDPOS() is most often used with the FIELDPUT() and
     FIELDGET() functions.

     FIELDPOS() return the names of fields in any unselected work area by
     referring to the function using an aliased expression.  See the example
     below.

 Examples

     .  This example demonstrates a typical specification of the
        FIELDPOS() function:

        USE Customer NEW
        ? FIELDPOS("Name")                     // Result: 1
        ? FIELDGET(FIELDPOS("Name"))           // Result: Kate

     .  This example uses FIELDPOS() to return the position of a
        specified field in a unselected work area:

        USE Customer NEW
        USE Invoices NEW
        ? Customer->(FIELDPOS("Name"))         // Result: 1
        ? Customer->(FIELDGET(FIELDPOS("Name")))
                                               // Result: Kate

 Files   Library is CLIPPER.LIB.


See Also: FIELDGET() FIELDPUT()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson