Page tree
Skip to end of metadata
Go to start of metadata

BellaDati supports all Arrays from and ArrayUtils from

Syntax: first define name of the package, then use desired method.


def int[] a = [1,2,3]
a = ArrayUtils.add(a, 0)
return a[3]


The transformation script has built-in support for two important data types, lists and maps (Lists can be operated as arrays in Java language). Lists are used to store ordered collections of data. For example an integer list of your favorite integers might look like this:

emptyList = []
myList = [1776, -1, 33, 99, 0, 928734928763]
return [0]

Another native data structure is called a map. A map is used to store "associative arrays" or "dictionaries". That is unordered collections of heterogeneous, named data. For example, let's say we wanted to store names with IQ scores we might have:

emptyMap = [:]
scores = [ "Brett":100, "Pete":"Did not finish", "Andrew":86.87934 ]
return scores["Pete"]

To add data to a map, the syntax is similar to adding values to an list. For example, if Pete re-took the IQ test and got a 3, we might:

scores["Pete"] = 3

To get the size of the collection, you can use the size() function:


Looping is provided using the each() closure:

myList.each() {
  if (it > 0) {
    return it;


Convert bank account number to bank name

Let the column cell contains a full bank account number (eg. "54-123456789/0100") and we transform it to the bank name according to last 4 digits. The script is:

def bankCodes = [ '0100' : 'KB', '0800' : 'CSOB'
code = right(value(), 4)
return bankCodescode ? bankCodescode : 'Other'
  • No labels