ItemCount

Synopsis
This keyword can be used in a parameter of any array function. ItemCount denotes the number of elements in the source array. This is also useful when you need to retrieve the index of the last element of the array.
Returns
Returned types: Numeric.
Examples
1.

The following example returns the sum of all elements in the NumericArray variable except the last 5.

{SUM(Variables.NumericArray, 1, ItemCount - 5)
2.

The following example returns an array where each element represents the difference between each element in the source array and the previous element in the source array. The array that is returned can be referred to as the difference array. Since the first element in the source array has no previous element, it is ignored when calculating the difference array (therefore the StartIndex parameter of the SELECT function is set to 2 instead of 1).

SELECT (Flowchart.MyArray, 2, ItemCount - 1, Item.Y - Flowchart.MyArray(Index - 1).Y)