In order to import data in SocrateCloud, you need to use an import format. The system comes with a series of pre-defined structures that can be customised/adapted. This customization is done by eliminating (delete) and re-ordering the fields in the structure (Field Format), changing the structure of the data type fields, etc.
To view and modify import formats, you need to follow the path System Admin -> Data -> Data Import -> Import Loader Format.
The window contains the following fields:
Name - the name of the format used when selecting the import structure;
Table - the table used to write the imported data in;
Format - the format of the file to be imported. Available options:
Comma Separated - csv file delimited by commas;
Fixed Position - txt file where every field has a fixed start and end position;
Semicolon Separated - csv file delimited by semicolons;
Tab Separated - txt file delimited by the Tab separator;
Header row(s) count - you can indicate the number of lines considered as headers in the imported file. These will not be imported.
The Format Field tab contains the following fields (each line represents a column of the imported file):
Sequence - the order number of the field inside the structure;
Name - the name of the field;
Column - the column from the table selected on the master window, corresponding to the field;
Data Type - the type of the data to be imported. Available options:
String - the values to be imported in these fields correspond to pre-defined records (e.g. organization name, business partner code, product code, etc.);
Number - the values to be imported in these fields are numbers. This option is used for quantity, value, price, or other number type fields;
Date - the values to be imported in these fields are dates. This option is used for date type fields;
Constant - this option is used for the fields that can be defined as constants for the import file. These must not be found as columns in the imported file, as you have to entered the constant values for each constant line. These fields are the last to be entered in the import format;
Start No - this establishes the import order of the fields in the import file (from 1 to n). It is usually equal to the sequence. The columns of the imported file must follow this order. The filed is inactive for Constant - Data Type, therefore, for these fields, you must first enter the Start No and, only afterwards, select the Data Type;
Constant Value - this will be displayed if you select the Constant - Data Type. Enter a constant value depending on the selected column (name, ID, code, etc.). For the date type constants, the form is yyyy-mm-dd;
Data Format - this will be displayed if you select the Date - Data Type. Enter the date format you are expecting from the imported file (the most common one is ddMMyy);
Decimal Point - this will be displayed if you select the Number - Data Type. This represents the decimal separator used in the imported file;
Divide by 100 - this will be displayed if you select the Number - Data Type. If selected, the number imported from the file will be divided by 100 so you can obtain the correct value;
Callout Code - this facilitates the creation of Java extensions that help with some tasks. For example: "org.compiere.model.CalloutRequest.copyText" instantiates the "CalloutRequest" class and accesses the "copyText" method. You can define multiple callouts, separated by semicolons.
To import files containing character sets other than Latin, that the file must be saved using UTF-8 encoding. This encoding is recognized by SocrateCloud and the import data will be done successful.