GET FIELD PROPERTIES

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 6.7.1 (Modified)


GET FIELD PROPERTIES (fieldPtr | tableNum{; fieldNum}; fieldType{; fieldLength{; indexed{; unique{; invisible}}}})

ParameterTypeDescription
fieldPtr | tableNumPointer | NumberTable number or Field pointer
fieldNumNumberField number if Table number is passed
fieldTypeNumberType of field
fieldLengthNumberLength of field, if Alphanumeric
indexedBooleanTrue = Indexed, False = Non indexed
uniqueBooleanTrue = Unique, False = Non unique
invisibleBooleanTrue = Invisible, False = Visible

Description

The GET FIELD PROPERTIES command returns information about the field specified by fieldPtr or by tableNum and fieldNum.

You either pass:

the table and field numbers in tableNum and fieldNum, or

a pointer to the field in fieldPtr.

After the call:

fieldType returns the type of the field. The fieldType variable parameter can take a value provided by the following predefined constants:

ConstantTypeValue
Is Alpha FieldLong Integer0
Is TextLong Integer2
Is RealLong Integer1
Is IntegerLong Integer8
Is LongIntLong Integer9
Is DateLong Integer4
Is TimeLong Integer11
Is BooleanLong Integer6
Is PictureLong Integer3
Is SubtableLong Integer7
Is BLOBLong Integer30

The fieldLen parameter returns the length of the field, if the field is Alphanumeric (i.e., fieldType=Is Alpha Field). The value of fieldLen is meaningless for the other field types.

The indexed parameter returns True is the field is indexed, and False if not. The value of indexed is meaningful only for Alphanumeric, Integer, Long Integer, Real, Date, Time, and Boolean fields.

The unique parameter returns True if the field is set to "Unique", else False. The Unique attribute can be set only to indexed fields.

The invisible parameter returns True if the field is set to "Invisible", else False. The Invisible attribute can be used to hide a given field in 4D standard editor (label, charts...).

Examples

1. This example sets the variables vType, vLength, vIndex, vUnique and vInvisible to the properties for the third field of the first table:

   GET FIELD PROPERTIES(1; 3;vType;vLength;vIndex;vUnique;vInvisible)

2. This example sets the variables vType, vLength, vIndex, vUnique and vInvisible to the properties for the field named [Table3]Field2:

   GET FIELD PROPERTIES(->[Table3]Field2;vType;vLength;vIndex;vUnique;vInvisible)

See Also

Field, Field name, SET INDEX.


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