Export transformation code

Export transformation codes enable the formatting of SQL evaluation results (as an array of objects) into any string format for export, e.g., CSV.

Export Transformation Codes are the second way to perform custom transformations in evaluations. In this case, they are used to output data for an export in any desired format. The input format, like with Chart Transformation Codes, is the result of the SQL evaluation, with an array of objects:

[
  {
    "Probe": "P01",
    "Messwert": 0.31
  }, {
    "Probe": "P02",
    "Messwert": 1.54
  }
]

The return value must be a string in this case, as the result is no longer processed further on the server side. Here is an example of a simple transformation into a CSV format.

function transform (data) {
  let csv = Object.keys(data[0]).join(';') + '\n'
  
  csv += data.map(row => {
    return Object.keys(row).map(k => row[k]).join(';')
  }).join('\n')
  
  return csv
}

Continue with: Webservice Response Handler

Last change: 06.11.2025

General information

Interfaces

Kompetenzen

AI functions

Employees

Reports

Report table editor

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