Arrays

An array is an ordered collection of values of different data types. Values are separated by commas. Arrays are indicated by the use of bracket notation [ ].

Arrays can be one-dimensional as a single array. They can also be multi-dimensional as an array of arrays.

For example:

["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday"]

See also Array in arrays.

Using arrays in the Formula editor

Selecting all elements

Using the following formula, you can select all elements of an array:

  • data-source.body.item.[]

This shows an example of this type of structure.

Selecting all elements of an array

Selecting an element

Using the following formula, you can select one element of an array:

  • data-source.body.item.[1].attribute

This shows an example of this type of structure.

Selecting an element in an array

Selecting the first element in an array

Using the following formula, you can select only the first element of an array:

  • data-source.body.item.[1].attribute

This shows an example of this type of structure.

An array in array example

Using Axel-F functions with arrays

Axel-F functions can be used together with arrays to obtain required results. The following formula uses the SUM() function.

  • SUM(data-source.path.[].attribute, second argument)

Let's say we wanted to determine the temperature in Celcius but it has been provided in Kelvin. We could use the SUM formula to take the current temperature - 273.15 to obtain the temperature in Celsius.

Using Axel-F functions in arrays