Field

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


Field (tableNum | fieldPtr{; fieldNum}) Number | Pointer

ParameterTypeDescription
tableNum | fieldPtrNumber | PointerTable number or Field pointer
fieldNumNumberField number, if Table number is passed
Function resultNumber | PointerField number, if Field pointer is passed
Field pointer, if Table and Field numbers
are passed

Description

The Field command has two forms:

If you pass a table number in tableNum and a field number in fieldNum, Field returns a pointer to the field.

If you pass a field pointer in fieldPtr, Field returns the field number of the field.

Examples

1. The following example sets the fieldPtr variable to a pointer to the second field in the third table:

   FieldPtr:=Field(3; 2)

2. Passing fieldPtr (a pointer to the second field of a table) to Field returns the number 2. The following line sets FieldNum to 2:

   FieldNum:=Field(FieldPtr)

3. The following example sets the FieldNum variable to the field number of [Table3]Field2:

   FieldNum:=Field(->[Table3]Field2)

See Also

Count fields, Field name, GET FIELD PROPERTIES, Table.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next