Reference > Functions reference > Design functions > FieldType
 

FieldType

Returns information about fieldName.

Format 

FieldType ( fileName ; fieldName )

Parameters 

fileName - the name of an open database file (local or remote).

fieldName - the name of a field in the specified database file.

Data type returned 

text

Originated in 

FileMaker Pro 6.0 or earlier

Description 

Field names must be in the format tablename::fieldname to specify a field that exists in a table different from the current table. The result has four values separated by spaces:

The first value is either Standard, StoredCalc, Summary, UnstoredCalc, External(Secure), External(Open), or Global.

The second value is the field type: text, number, date, time, timestamp, or container.

The third value is Indexed or Unindexed.

The fourth value is the maximum number of repetitions defined for the field (if the field isn't defined as a repeating field, this value is 1).

Example 1 

FieldType ( "Customers" ; "Phone Number" ) returns Standard Text Unindexed 3 when, in the Customers database file, the Phone Number field is defined as a text field that repeats a maximum of three times and the storage options are left unchanged. (Most fields are indexed when a find is performed in that field.)

Example 2 

FieldType ( "Customers" ; "Current Balance" ) returns StoredCalc Number Indexed 1 when, in the Customers database file, the Current Balance field is defined as a stored, numeric calculation field that is indexed.

Example 3 

FieldType ( "Customers" ; "Today's Date" ) returns Global Date Unindexed 1 when, in the Customers database file, the Today's Date field is defined as a global field of type date. Global fields are never indexed.

Example 4 

FieldType ( "Customers" ; "Statement" ) returns External(Secure) Container Unindexed 1 when, in the Customers database file, the Statement field is defined as a container field that stores data externally using secure storage. Container fields cannot be indexed.

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas