With this function [FILE_FIELD (file;key;co;index;field)], you can display fields from Exact files. Using this function, you can actually get anything you want from the database. You need to know the keys of the field. You can generate these keys using the functions FILE_NEXT and FILE_FIRST. Use these functions together with the function FILE_FIELD.
Select the company for which you want to get the Exact data. If you select Default, the data will be taken from the default company. If you select a company, the data for the selected company will be displayed.
The advantage of not selecting a company is that the same report can be used for each company. You only need to change the default company to get the right data.
Select the function you want to use. To select data from Exact files you should choose the function "FILE_FIELD".
Select the table from which you want to get data, for example, "grtbk" for general ledger accounts or items for items.
Generally, the key is the code for something. For VAT codes for example, it is the code itself. Sometimes it is not clear what the key is. Using the functions FILE_NEXT and FILE_FIRST, you can generate a key.
An example of using the function "FILE_FIELD" combined with "FILE_FIRST"’ and "FILE_NEXT".
Select the index. Generally the right index is equal to the table name.
Select the field you want to see. If you do not select a field, the description is displayed.
FILE_FIELD("betcd";"04";001;"betcd";"oms30")
This function displays the description of payment condition 04 from company 001.