With a few exceptions, the core is always a JavaScript function called transform which contains the dataset to be transformed as its first parameter. The corresponding data structure is explained in the respective sections. Where relevant, further parameters such as the filename are also provided.
/**
function transform (data, filename, extra) {
return []
}
Included Libraries
Additionally, various external tools are integrated and can be used in the transformation codes:
dayjsxmlParserxmlParser4xmlParser4SFTPClientpapaaxiosExample for using the included libraries
An Axios example for transferring two measurement data points via HTTP to a Labordatenbank import interface:
const axios = require('axios') // already included when calling the transform function
axios({
method: 'post',
url: 'https://user:pwd@labordatenbank.com/demo/imports/import/x/0/https',
data: [ { "pH-Wert": 7.4 },
{ "LF": 1200 } ]
}).then(function (response) {
console.log("Response from import interface: " + response.data.msg);
});
A day.js example for date conversions:
const dayjs = require('dayjs') // already included when calling the transform function
// Create dayjs Object from Unix timestamp
let production_date = dayjs.unix(1637762955)
console.log("Production date: " + production_date.format('DD.MM.YYYY'));
let expiration = production_date.add(2, 'year')
console.log("Expiration date: " + expiration.format('DD.MM.YYYY'));
An SFTP example:
async function transform(data) {
const client = new SFTPClient()
try {
await client.connect({
host: 'test.rebex.net',
username: 'demo',
password: 'password',
})
console.log('Connection successful!')
// The input string must be transformed using Buffer.from as the first parameter. This is the data that will be written to the uploaded file.
// upload_filename.txt is an example filename. Any filename is required to upload the data in the 1st parameter.
await client.put(Buffer.from('Example Input String'), 'upload_filename.txt')
} catch (e) {
console.error('SFTP Error', e.message)
}
}
Continue with: Transformation code for evaluations
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