4D v14.3

GET FIELD PROPERTIES

Home

 
4D v14.3
GET FIELD PROPERTIES

GET FIELD PROPERTIES 


 

GET FIELD PROPERTIES ( fieldPtr | tableNum {; fieldNum}; fieldType {; fieldLength {; indexed {; unique {; invisible}}}} ) 
Parameter Type   Description
fieldPtr | tableNum  Pointer, Longint in Table number or Field pointer
fieldNum  Longint in Field number if Table number is passed
fieldType  Longint in Type of field
fieldLength  Longint in Length of field, if Alphanumeric
indexed  Boolean in True = Indexed, False = Non indexed
unique  Boolean in True = Unique, False = Non unique
invisible  Boolean in True = Invisible, False = Visible

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:

    Constant Type Value
    Is alpha field Longint 0
    Is BLOB Longint 30
    Is Boolean Longint 6
    Is date Longint 4
    Is float Longint 35
    Is integer Longint 8
    Is integer 64 bits Longint 25
    Is LongInt Longint 9
    Is picture Longint 3
    Is real Longint 1
    Is subtable Longint 7
    Is text Longint 2
    Is time Longint 11
  • 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 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...).

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)

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)

 
PROPERTIES 

Product: 4D
Theme: Structure Access
Number: 258

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

Field
Field name
SET INDEX

 
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)