The following is a general procedure that describes how to locate the tables and fields into which to import data. You will find it helpful to have a clear understanding of the application, and how the relationships between tables will affect the data you import.
The main table typically is the table within a table group to which all other tables are related. For instance, if you want to import accounts and account descriptions into an accounting system, the Account Master table would be the main table. Use the Resource Descriptions tool to obtain descriptions of data stored in the application’s tables.
The Import Utility allows you to import data into any table in the application. The application may contain tables that are not appropriate to import data into. Consult the documentation included with the application to find out whether it contains such tables. |
You will need to create separate import definitions for each table that you need to import data into.
Review all tables belonging to a table group using the Resource Descriptions tool to be sure synchronous data appears for records you're importing.
In addition to the other tables in the table group, update all tables that must contain synchronous data for records to be stored properly. (Not all tables related to the main table are in the same table group.)
You must import data to all required fields. Required fields include the fields in each of the table's keys, the fields that are required by each window that uses the table, and "non-window" required fields.
Most required fields for a selected table are listed in the Additional Table Information window in the resource descriptions. Following is an explanation of the types of required fields that need to be addressed for each table you import to:
Key fields A key is a field or combination of fields within a table that must contain a value in order for the rest of the record to be stored and displayed properly. For each table you import to, at least one key for the table must be addressed in the import definition you create. Each record in the import file must have the data necessary to fulfill the key requirements for the table it's being added to. If a record doesn't meet the key requirements for the table, it won’t be imported.
To avoid this, review the records in your import file and be sure that there is adequate information in each record to fulfill the key fields for the table and that each record's key value is unique. Since key fields are required fields, key fields can be viewed in the Additional Table Information window in the resource descriptions.
Window required fields If the user must enter information in a field before a record can be saved, that field is a required field for the table it's stored in. To view the required fields for a window, mark the Show Required Fields menu item in the application. To view the windows that access a table, use the Table Usage window in the resource descriptions.
Non-window fields Some fields in tables aren't displayed in a window, but are used to store additional information about a record displayed in a window. If a non-window field is a field required for the table, you must be sure the appropriate data is imported to that field or set a constant value for it.
The Import Utility considers a record to be a duplicate if the key values entered for a record are the same key values for another record. If a duplicate record is encountered during the import process, the record will be rejected and won’t be imported into the destination table.
To avoid this, review the records in your import file and be sure that there's adequate information in each record to fulfill the key requirement of the destination table and make each record's key value unique.