Xbasic

FIELD Function

Syntax

Field_Name as C = FIELD(C tablename,N fieldno)

Arguments

tablename

A non-null character string. Table_Name must be fully qualified if it is not the primary table for the associated form.

fieldno

For a table, Field number is 1; for a set, Field_Number is the position of the table in the set diagram (starting at line 1).

Description

Returns the name of a numerically specified field in the given table.

Discussion

FIELD() returns the Field_Name of the field specified by its Field_Number in the table specified by the Table_Name parameter.

Example

The following script was placed under a button on the Customer Information form of the customer table in the AlphaSports database. When pressed, the message box displayed "Company".

ui_msg_box("Field 4", field("customer", 4))

See Also