Parameter | Description |
---|---|
iField | Number of the column in the table |
Property Integer Field_Index
Read Access: | Get Field_Index iField to IntegerVariable |
Field_Index retrieves the main index for a 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 will be returned. If no index is assigned, -1 is returned.
Get Field_Index of hDD iField to iIndex Get Field_Index of hDD Field FileName.FieldName to iIndex Function Field_Index integer iField returns Integer : // augment as needed End_Function
This property is usually called by File_Field_Index, which 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 owner object. For this reason, you should never augment File_Field_Index; augment Field_Index instead.
When accessing this property, you can use either File_Field_Index or Field_Index. Using File_Field_Index is easier because you do not have to worry whether 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 to be sure that it will get called.
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 name. These should never be mixed!
// When using Field_ message use the FIELD keyword Get 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
Note: | The messages File_Field_Index and Field_Index were created to replace the now obsolete message Field_Main_Index. |