C5_FIELDPOS

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



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.