4D v14.3

Field name

Home

 
4D v14.3
Field name

Field name 


 

Field name ( fieldPtr | tableNum {; fieldNum} ) -> Function result 
Parameter Type   Description
fieldPtr | tableNum  Pointer, Longint in Field pointer or Table number
fieldNum  Longint in Field number if a table number is passed as first parameter
Function result  String in Name of the field

The Field name command returns the name of the field whose pointer you pass in fieldPtr or whose table and field number you pass in tableNum and fieldNum.

This example sets the second element of the array FieldArray{1} to the name of the second field in the first table. FieldArray is a two-dimensional array:

 FieldArray{1}{2}:=Field name(1;2)

This example sets the second element of the array FieldArray{1} to the name of the field [MyTable]MyField. FieldArray is a two-dimensional array:

 FieldArray{1}{2}:=Field name(->[MyTable]MyField)

This example displays an alert. This method passes a pointer to a field:

 ALERT("The ID number for the field "+Field name($1)+" in the table "+Table name(Table($1))+" has to be longer than five characters.")

 
PROPERTIES 

Product: 4D
Theme: Structure Access
Number: 257

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Field
Get last field number
Table name

 
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)