Language:


Routines - Imports

The Imports routine allows you to import the contents of text files, previously saved in the proper format, into the Company you are working with. Usually, only new records will be added during the import process, and there is no danger that you will get duplicate data of any kind in your database. However, if you import a setting that is a set of fields and check boxes (e.g. the Company Date and Numeric Format and Activity Types, Subsystems settings), the imported setting will overwrite the existing setting.

To begin importing, click the [Routines] button in the Master Control panel and then the [Imports] button in the 'Routines' window. Alternatively you can use the Ctrl-Shift-I (Windows) or ⌘-Shift-I (Mac OS X) keyboard shortcut at any time (even if the Master Control panel is hidden). The 'Imports' list window will be opened, where you can specify what is to be imported. The options available in the 'Imports' list window will vary, depending on the active module. Double-click the option that you need and then, when the 'Open File' dialogue box opens, locate and open the import file in the normal way.

You must save or cancel all changes before trying to import information. If you are modifying a record or setting (i.e. at least one window is open with the title 'Update'), you will be told 'Some records/blocks are locked' when you attempt to use the Imports routine.

In multi-user systems, you can only use the Imports routine when you are the only user logged in.

You should use the Imports routine to restore your Standard CRM database from a back-up and when updating to a new version of the program. For full details of how to do this, please refer to the Restoring from a Back-up page.

You should also use the Imports routine to import information previously exported from another Standard CRM database or from a text file created by another program. In the latter instance, you should ensure the text file is correctly formatted (contains the information in the correct order) before importing. This format information is available from your local Standard CRM representative and can also be found in the Export Format report in the Technics module.

Usually, you will use the 'Automatic' or 'Automatic manual file search' import functions in the System module to import information in this way. These functions require the following lines to appear at the beginning of the import file:

format
1    46    1    0    1    44    0    /

codepage    UTF-8
The numbers in the second line should be separated by tabs. There should be at least one empty line before the codepage. The word "codepage" and the codepage should be separated by a tab.

The numbers in the second line are parameters that inform the import procedure about the contents of the import file, as follows:

Date Order
The first parameter tells the import procedure what date format you have used in the text file. You can use the following values:
0
Month/Day/Year

1
Day/Month/Year

2
Year/Month/Date

3
Month/Year/Day

4
Day/Year/Month

5
Year/Day/Month

6
Hijri (Arabic)

7
Persian
Decimal Character
The second parameter uses ASCII codes to tell the import procedure what decimal character you have used in the text file. Typical values are:
44
comma

46
full stop
Import Mode
Use the third parameter to specify the platform on which you created the text file, as follows:
0
Mac OS X, AIX, iSeries

1
Windows, Linux
The import procedure will use the default codepage for the platform specified here for string conversion if the fifth parameter (String Type) is 0 and if there is no "codepage" line at the beginning of the file.

Replace Mode
This parameter tells the import procedure what to do if information in the text file duplicates what is already in the database.
0
Any duplicate information in the text file will not be imported. Records in the database will not be replaced.

1
Duplicate information in the text file will be imported, overwriting existing records in the database. This applies to entire records. For example, there is an existing Customer 001 in the database with the name Customer A and Payment Terms 30 days, and in the import file Customer 001 has the name Customer AA and no Payment Terms. The import procedure will overwrite the entire record for Customer 001, so the result will be that it has the name Customer AA and no Payment Terms. Records in the database with no duplicate in the text file will not be touched.
Note that blocks will always be overwritten with duplicate information from a text file, irrespective of whether this parameter is 0 or 1. There are two types of block: the setting that is a set of fields and check boxes (e.g. Company Date and Numeric Format, Activity Types, Subsystems); and the setting that is a series of rows (e.g. Quotation Classes, VAT Codes).

String Type
Use the fifth parameter to specify the character set used in the text file:
0
The text file contains characters belonging to a single character set (e.g. ASCII, KOI-8R [Russian Cyrillic], ISO-8859-1 [Western European]).

1
The text file contains Unicode characters.
If this parameter is 0 and if there is no "codepage" line at the beginning of the file, the third parameter will determine the codepage/character set.

By default, text files exported from a Standard CRM database will contain Unicode characters. You can change this by specifying a Default Export Codepage in the Local Machine setting in the User Settings module.

Thousands Separator
The sixth parameter uses ASCII codes to tell the import procedure what thousands separator you have used in the text file. Typical values are:
0
No thousands separator

32
space

44
comma

45
hyphen

46
full stop
Escape Character
The seventh parameter is not currently (version 6.2) used by the import procedure. You should place a 0 (zero) in this position as shown in the example at the beginning of this section.

Date Separator
The eighth parameter will tell the import procedure what date separator you have used in the text file. This parameter should be the actual character, not the ASCII code. Typical values are:
(blank)
System default (set in the Company Date and Numeric Format setting in the System module)

/
/

.
.

-
-
Use the "codepage" line to name the character set that you have used in the text file. This line should contain the appropriate value taken from the left-hand column in the following table:
UTF-8UTF-8 (Unicode)
ISO-8859-1ISO 8859-1 (Western Europe)
ISO-8859-4ISO 8859-4 (Baltic)
ISO-8859-5ISO 8859-5 (Cyrillic)
ISO-8859-15ISO 8859-15 (Western European with Euro sign)
US-ASCIIUS ASCII
CP437DOS CP 437 (US)
CP850DOS CP 850 (Western Europe)
CP1250Windows codepage 1250 (Central Europe)
CP1251Windows codepage 1251 (Cyrillic)
CP1252Windows codepage 1252 (Western Europe)
CP1257Windows codepage 1257 (Baltic)
KOI8-RKOI8-R (Cyrillic)
MACINTOSHApple Western Europe
ACEApple Central Europe
ACYRApple Cyrillic
Generating Unique Numbers
If you are importing Quotations, the import file may already contain Quotation Numbers. However, you may want new numbers to be assigned to each record as part of the import process. If so, enter "-99" in the import file in the space where each Quotation Number would otherwise appear. When each record is imported, it will be given the next number in the relevant Number Series, as if you had entered it yourself.

If you use this feature, take great care over the following two points:

  1. The Quotation Number is determined by the Quotation Date. The Quotation Number will be the first unused number in the Number Series for the year or other period in which the Quotation Date of the Quotation falls. Make sure you include a Quotation Date for each record in your import file, otherwise the imported records could be placed in the wrong number sequence.

  2. Make sure there are sufficient unused numbers in the relevant Number Series for the number of records that will be imported. If there are not enough unused numbers in the relevant Number Series, some records will not be given numbers at all.
Individual Import Functions
Please click the links for details about the individual import functions, descriptions of which have been divided into the following categories:
In this chapter:
Go back to: