See Also: RefClass, RefFunc, RefProc, RefProcSet
Allows for a simpler way of referencing a table number or column number.
(RefTable( {TableName} ))
This is a function that makes it easier to work with table numbers and table column numbers by their name.
Normally, a table number is referenced by Table.File_Number, and a Table.Column argument returns the value for that Table.Column argument. RefTable(Table) returns the table number of Table and RefTable(Table.Column) returns the column number of Column in Table.
For example:
Move (RefTable(Customer.Name)) to iColumn // would return the column number (2)
If you don't pass the ".ColumnName", the Table number is returned
Move (RefTable(Customer)) to iTable // would return the table number (25)
This means you don't have to use the Get_FieldNumber and Get_FileNumber commands, the ".File_Number" column literal or use the FILE and FILE_FIELD modifiers. Those all still work but RefTable() can be easier to use. RefTable() is supported by CodeSense and CodeComplete.
Get_Attribute Field_Length of Customer.File_Number (RefTable(Customer.Name)) to iLength
<or>
Get_Attribute Field_Length of (RefTable(Customer)) (RefTable(Customer.Name)) to iLength
Function Field_CommitNoEnterOnIndex Integer iField Returns Boolean
Function_Return (RefTable(OrderHea.Order_Date)=iField)
End_Function
Procedure ClearNamePrompt
Set Prompt_Object of oCustomerDD (RefTable(Customer.Name)) to 0
End_Function
RefTable can only be evaluated at compile time.