# Import and Update Object Data

You can import object data to the 4ALLPORTAL or update existing data via external files of filetypes CSV or Excel XLSX. For this, go to admin snap-in CSV Import/CSV Import.

If you require no field mapping, you can work with the fields in this snap-in (simple mode).
If you require a field mapping, you first need to make settings in admin snap-in CSV Import/Mapping configuration (extended mode).

In both cases, the technical module name and the technical field names for the metadata import are required.

# Upload File Specifications

You can upload either a CSV or an XLSX file. Please note the requirements:

# CSV File

  • format ".csv"
  • needs to be semicolon separated (with a semicolon as column divider)
  • needs to have character encoding UTF-8 (or others, if using the extended mode)

# Excel File

  • format ".xlsx"
  • needs to hold the technical module name as sheet name (case-insensitive)
  • if working with multiple sheets, consider their order as they are imported from left to right

# File Syntax

The file you upload via "Please select a .csv file" needs to follow these rules:

  • first line: The first line of your CSV/XLSX must include the technical field names of the module you are importing to (one field per column)
  • required fields: Please consider required fields of the target module when creating/updating objects.
  • ID field: You may set the ID field to create or update an existing record. The ID has to be of type GUID, e.g. "ecd6083a-fe34-49c7-ba47-6c2fb1fe88cd".
    The ID may be shortened, but this will produce problems with some databases. The ID cannot be longer than 36 characters.
  • list based values and value separator: List-based values, e.g., in CEVarcharList, have to be comma-separated. Whitespaces do matter: An entry "a, b" would result in one value "a" and a second value "b" with a leading space.
  • empty values: Empty values will set the value to null, so delete existing field content.

Empty values in the last column will be ignored (except using the extended mode), so they are not treated as null. Make sure to have no empty values in the last column unless your workflow allows them to be ignored.

# Upload A File With Simple Mode

Simple mode is used when you do not require a field mapping, i.e. when your import file works with the same field names as in the target module. In admin snap-in CSV Import/CSV Import you need to fill the following fields (except "Import mapping") and upload your file:

Name Description
Import into module Select the module you want to import your data to
Bulk-changing data Confirm by setting to true.
Import mapping Only required for a mapping with extended mode.
Regex for separating list values Default: [; ]
Please select a CSV File (; separated) Upload your file here. For specifications, compare here

After uploading, you need to save your settings.

# Upload a File With Extended Mode

Extended mode is required as soon as you need to map field names from your import file to the field names of the target module before starting the upload.

  1. Go to admin snap-in CSV Import/Mapping configuration/Field mapping profiles and add a new mapping configuration for the module required.
  2. After a reload, your module displays as a new admin snap-in. Open it and create a mapping for each field required:

Name Description
Target field Field of the target 4ALLPORTAL module
Mapping template Template to set the value. The variables are same to the column names of the CSV file.
Delimiter Character(s) or regex to split the value for list fields into an array (default is '[;]'').
**Example:**Split the value of one source field ("John Doe") to two fields in the 4ALLPORTAL ("John", "Doe").
Set instruction Instructions that tell how the field will be set (default is overwrite).
Comparison operator If set, the field is used to determine the target objects, otherwise the target object will be search by id (as soon as the id field is configured or as a column).
Type of the field If the target field is a virtual field or a relation, the type of the field needs to be set.

Additionally, you can set the character encoding by using the extended mode of the import.

Note that at least one field mapping must be added. If the configuration for a field is missing, it will be generated automatically, with the name of the target field equal to the column name.

\3. After mapping configuration, go to admin snap-in CSV Import/CSV Import and fill in the fields like described for the simple mode.

Make sure to select your mapping configuration in field "Import mapping". After you have a value here, the extended options appear. Fill them, if required:

Name Description
Character encoding Character encoding of the CSV file (e.g., iso-8859-1)
default is UTF-8 with or without BOM.
Field separator Character which is used to separate values in a CSV file.
Absolute folder path Server-side path for log output

\4. After uploading, you need to save your settings.

# Update Existing Objects

If you want to update objects already existing in the 4ALLPORTAL, you have two options:

  • you can add the objects' IDs as a column to your upload file (possible in simple mode)
  • if you do not have/know the IDs, add distinctive data as columns to your upload file (e.g., file name and parent path) and add a condition that must be met for this data to your mapping snap-in (possible in extended mode only)

If you want to update objects you do not have the IDs for in simple mode, you can follow this example.

# Job Processing

The import job is executed asynchronously in four different steps. When storing the CSV import:

  1. the file is uploaded
  2. the snap-in data (module name, disclaimer boolean) is stored in the backend
  3. the file is renamed to {module_name}.{timestamp}.csv" and moved into the module's cefs folder, subfolder "csv_import"
  4. the import is processed. Once this is done, the import will move the file to a subfolder called "done" or "error" (troubleshooting).

# Troubleshooting

If your import did not work properly, you can check error messages in the system application log (admin snap-in Protocol overview/Application logs).

Request missing documentation