Import transformation code

Import Transformation Codes are scripts for processing raw data into an importable format for the Labordatenbank.

Import transformation codes for import interfaces offer the possibility to convert the loaded raw data into a different format, or to process it further before it is imported into the Labordatenbank. The first parameter contains a String with the raw data. This can be processed either manually or with one of the provided libraries. The second parameter contains the filename, also as a String.

The return value must be an Array of objects whose keys correlate with the columns to be imported.

Example of a transformation code:

function transform (data, filename) {
  const parsedData = xmlParser.parse(data)
  const filenameWithoutExtension = filename.match(/(.*)\.\w+/)[1]
  
  let result = parsedData.ERGEBNIS.map((e) => {
    return {
      'Datum': e.Datum,
      'Stichwort': e.Stichwort,
      'Probenstatus': e.Probenstatus,
      'Datei': filenameWithoutExtension
    }
  })

  return result
}

Last change: 12.11.2025

General information

Reports

Report table editor

Interfaces

Kompetenzen

AI functions

Employees

Introductory phase

Query reports

Orders

Samples

Templates

Customers

Client zone (optional)

Assets

Offers

Invoices

Parameters

Calculating with parameters

Webservices

Transformationscode

Test plans / limit values / specifications

Documents control

Material

Questions and answers

Equipment

Trainings

8D-report

Others

PDF templates

Supplier evaluation

File management

Processes