2024 Update Rollup 1

Import and Update of DataPermanent link for this heading

For importing or updating of data a Data Import object has to be created and configured (for more information, see chapter “Configuration of the Data Import”.)

Manual ImportPermanent link for this heading

To start the import, use the context menu command “Import Data“ of a data import object.

The import progress is displayed in an own window.

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

If during an import process no objects can be created anymore because e.g. the server goes down, read records are not lost. The data are written to a log file and the import process can be continued at a later date (context menu command “Roll Forward”).

Note: When importing data from Microsoft Office Excel to Fabasoft Folio, the files have to be closed that the import process can be processed successfully. Attention: If files are open, no error message is displayed.

Programmatical ImportPermanent link for this heading

For programmatical import (e.g. via script) the action Remote-controlled Import (FSCCOLD@1.1001:ImportRemote) is available with the following parameters:

  • Showdialog
    Use this parameter to determine whether the progress dialog is displayed.
  • closedialog
    Use this parameter to determine whether the progress dialog is closed at the end of the import without confirmation.
  • reportcreatedobjects
    If this parameter is set to TRUE and the parameter asynchron is set to FALSE, the created objects are returned in the createdobjects parameter.
  • createdobjects
    In this parameter the created objects can be returned.
  • rollforward
    Use this parameter to determine whether an abortes import process is continued.
  • asynchron
    If this parameter is set to TRUE, the import takes places in the background.
    Note: FALSE is only suitable for a small number of objects, because the client cache can not be cleaned up in this case.
  • paramobject
    This parameter can contain any COM object.
  • finishedscript
    This parameter can contain a content that is called as a script at the end of the import process.
  • synchobj
    If the asynchrony parameter is TRUE, in synchobj a COM object is returned.
    The COM object is not registered and therefore cannot be created explicitely. It implements  IDispatch and makes available the following functions:
    • Wait()
      Waits for the end of the import.
    • IsFinished()
      Returns TRUE if the import is finished, otherwise FALSE.
    • Cancel()
      Cancels the import.

ExamplePermanent link for this heading

In this section basis of a very simple, concrete example, all steps of a data import are demonstrated.

Initial SituationPermanent link for this heading

Organizations and their employees shall be imported. Exemplary the following data are available:

Organization:

  • Name
  • Branch of industry

Contact Person:

  • Last name
  • First name
  • E-mail address

Employee:

  • Relation between organization and person (m:n Relation)

The following Microsoft SQL server tables can be produced in the data base “migration“:

Organization

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Content:

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Contact Person

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Content:

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Employee

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Content:

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

ProcedurePermanent link for this heading

To be able to access the data, the OLE-DB interface is used and for that an UDL file is created (see chapter ”OLE DB“). As provider, in the properties of the UDL file (“Provider” tab) select the “Microsoft OLE DB Provider for SQL Server”. On the “Connection” tab select the relevant Microsoft SQL server, enter the connection information and specify the data base.

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

In the Fabasoft Folio domain, create a Data Import object for each table of the data base (Organization, Person and Employee).

Organizations

The organizations are imported first.

For each object property to be set an entry in the Mapping field is necessary. For unique identification, the ID is assigned to the property External Key (COOSYSTEM@1.1:objexternalkey) that is part of each object. The name is used as object name.

The property for the branch of industry needs a term object. Therefore to steps are necessary. First, in the Mapping field, for the branch select the object class FSCTERM@1.1001:Term, select the Property Name and determine to use it as a “Key” (for each branch the same object is used). Second, in the Object Relations field, assign the term to the property Industry of the organization.

In this example no further values are specified in the table.

To avoid duplicate organization objects, in Class Properties select “Check by Query for Each Object“ for object class (FSCFOLIO@1.1001:Organisation).

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Result (Based on the data of chapter Initial Situation”)

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Contact Persons

For each object property to be set an entry in the Mapping field is necessary. For unique identification, the ID is assigned to the property External Key (COOSYSTEM@1.1:objexternalkey) that is part of each object. For surname and first name two further entries have to be created.

For the e-mail address, two things have to be considered:

The property E-Mail Addresses (COOMAPI@1.1:emailinformation) is an aggregate. The single parts of the compound property can be addressed by a property path. To avoid duplicate entries (during multiple imports) the e-mail address is used as aggregate key (option “Aggregate Key”). Additionally select the option “Must Be Defined in Aggragate“ to avoid entries when there is no e-mail address and the option “Content as Value” to interpret the contents of the database as a value.

As address topic three terms (FSCTERM@1.1001:TermComponentObject, “Business”, “Private”, “Other”) are available. Our e-mail addresses get the topic “Business”. In the Mapping field, for object class FSCTERM@1.1001:TermComponentObject, select the Property Address (COOSYSTEM@1.1:objaddress) and as value type the object address of the desired term. In the Object Relations field, assign the term object to the property path “E-Mail Adresses.Topic” of Persons.

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Result (Based on the data of chapter Initial Situation”)

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Relations

The relation between persons and organizations is created through a further import. Therefore the property External Key of Organizations and Persons is used. To avoid double entries of persons in organizations, in the Object Relations field use the option “Unique Entries in List”. In the Class Properties field is defined, that objects that do not exist yet are not created.

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Result (Based on the data of chapter Initial Situation”)

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

Ein Bild, das Screenshot enthält.  Automatisch generierte Beschreibung

The next chapter gives an example for a file import.