count

Last update: 2024-01-29
  • Created for:
  • Experienced
    Developer

Counts the elements of the list not taking into account the null values.

Category

Aggregation

Function syntax

count(<listAny>)

count(<listObject>)

Parameters

Parameter Type Description
listToProcess listString, listBoolean, listInteger, listDecimal, listDuration, listDateTime, listDateTimeOnly, listDateOnly, or listObject List to process. For listObject, it must be a field reference. A listObject cannot contain null object.

Signatures and returned type

count(<listAny>)

Returns an integer.

Example

count([10,2,10,null])

Returns 3.

count(@event{my_event.productListItems})

Returns the number of objects in the given array of objects (listObject type). Remark: a listObject cannot contain null object

On this page