4D v14.3

Field

Home

 
4D v14.3
Field

Field 


 

Field ( tableNum ; fieldNum ) -> fieldPtr  
Parameter Type   Description
tableNum  Longint in Table number
fieldNum  Longint in Field number
fieldPtr   Pointer in Field pointer
Field ( fieldPtr ) -> fieldNum 
Parameter Type   Description
fieldPtr  Pointer in Field pointer
fieldNum  Longint in Field number

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.

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

 FieldPtr:=Field(3;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)

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

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

 
PROPERTIES 

Product: 4D
Theme: Structure Access
Number: 253

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Field name
GET FIELD PROPERTIES
Get last field number
Table

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)