Transform Node
Transform node allows you to transform data in the action flow using plain JavaScript.
To start, place the
Transform
node into your action flow.In the Inspector, find the Source Code property. This is where you can put your JavaScript code. Please, don't switch to fx in this case. The JS code is entered as plain text. If you switch to fx, it means you define the source code with an expression.
If you want to use the Transform's output in other flow nodes, don't forget to configure the node's ID (variable name).
Your JavaScript code is executed in the sandboxed environment. This means you have no access to the browser or Node.js APIs. But you can use simple built-in functions like bota
, atob
, encodeURIComponent
and so on.
Accessing Flow Variables
Because you are writing a JavaScript and not an Adapptio expression, you have to reference flow variables differently. There is a global variable $
(dollar sign) which contains all flow variables as properties.
Examples:
Real-world Example
This example demonstrates how to group a list of invoices by subject and calculate the aggregated sum of invoiced amounts for each of them.
Last updated