Skip to content

File_Field_Index - DataDictionary

Used to retrieve the index for a table and column

Type: Property
Access: Read-Only
Data Type: Integer
Parameters: None

Parameters

Parameter Type Description
iFile Integer Number of the table in the current filelist
iField Integer Number of the field in the table

Syntax

Property Integer File_Field_Index
Access Type Syntax
Read Access: Get File_Field_Index to IntegerVariable

Description

The File_Field_Index property should be used to retrieve the index for a table and column. If the DDO's ordering property is explicitly set (i.e., it is non-zero) that value will be returned. If it is not, the main index assigned that table and column in the Studio's Table Editor will be returned. If no index is assigned, -1 is returned.

Get File_Field_Index of hDD iFile iField to iIndex
Get File_Field_Index of hDD FILE_FIELD FileName.FieldName to iIndex

This property operates by finding the DDO that "owns" the passed table and sending the message Field_Index to that object. Therefore the message is actually resolved within Field_Index in the DDO that owns the table. For this reason, you should never augment File_Field_Index; augment Field_Index.

When sending this message you can use either File_Field_Index or Field_Index. Using File_Field_Index is easier because you do not have to worry that the message is sent to the correct DDO - it will find the owner DDO and send the message Field_Index.

When augmenting this method, always augment Field_Index in the owner DD. You can now be sure that this method will get called.

The messages File_Field_Index and Field_Index were created to replace the now obsolete message Field_Main_Index.

File and File_Field Interfaces

Many of the DataDictionary methods contain a two variants of the same message: Field_Message and File_Field_Message. For a complete description of these messages please refer to The Field and File_Field DD Interfaces.

The Field_ version of a message must use the keyword FIELD to identify the Table.Column name. The File_Field_ version must use the keyword FILE_FIELD to identify the Table.Column values. These should never be mixed!

// When using Field_ message use the FIELD keyword
Get File_Field_Index FIELD Customer.Name to sIndex

// When using the File_Field_ message use the FILE_FIELD keyword
Get File_Field_Index of oCustomer_DD FILE_FIELD Customer.Name to sIndex

See Also

Field_Index