The complex table definition defines a table of records containing multiple fields stored on the Agentry Client in a structured and searchable format. A complex table can contain large amounts of data with records numbering in the thousands. Included in the complex table are the fields for its records and indexes on fields to provide search functionality and structure to the overall data in the table. The complex table definition also defines how its data is synchronized.
The fields and indexes of a complex table define the structure of the records. A complex table must have a minimum of one index definition, which is the primary index. This index is defined for the field containing the unique identifier for each record. This field and index are then used during synchronization to identify records for addition, replacement, or removal.
The synchronization components of a complex table depend on the system connection the table definition uses for its data source. The synchronization components will match the system connection type. Independent of the system connection type, the synchronization logic for a complex table should account for retrieving all records when the table is in a rebuild state, retrieving just new or modified records during normal synchronization, as well as determining which records should be removed from the complex table.
The rebuild state of a complex table is set under various conditions. These include a published modification to the complex table definition, a user change occurring on the Agentry Client, and optionally based on the rebuild state being forced via administrator actions. During synchronization between the Agentry Client and Agentry Server, the Agentry Server will indicate if the complex table is in a rebuild state to the Agentry Client. The Agentry Client will remove all records for the complex table from the client device. The synchronization processing will retrieve all current records for the complex table and send them to the Agentry Client, rebuilding the table. This synchronization processing requires the developer to account for this situation.
When not in a rebuild state, the complex table can be updated selectively. Using an exchange data model for processing, only those records to be added, those records that need to be replaced, or those that need to be removed from the Agentry Client are retrieved by the Agentry Server from the back end system for the complex table. Any unchanged records will be left unmodified.