Field name

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 name (fieldPtr | tableNum{; fieldNum}) String

ParameterTypeDescription
fieldPtr | tableNumNumberField pointer or Table number
fieldNumNumberField number if a table number is passed
as first parameter
Function resultStringName of the field

Description

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.

Examples

1. 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)

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)

3. 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.")

See Also

Count fields, Field, Table name.


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