Skip to main content

Collection Functions

Collection Functions in Flux Logic are built-in utilities that operate on lists or collections. They handle tasks ranging from transformation to evaluation of elements based on specified criteria. These functions streamline the processing of data within collections, making tasks like filtering, aggregation, and projection more efficient and intuitive.

Collection Average

Returns the average of all the elements in a numbers collection.

CollectionAverage([Numbers])
ParameterRequiredTypeDescription
NumbersYesNumber ListThe list of numbers to find their average.
Return valueNumberThe result of adding the two numbers.
  • Example
     CollectionAverage([33,5,12,76])
    Result: 31.5

Collection Count

Counts the number of items in a collection.

CollectionCount([Inputs])
ParameterRequiredTypeDescription
InputsYesListThe list of numbers to find their average.
Return valueNumberThe result of adding the two numbers.
  • Example
     CollectionCount(["Math","Physics","Chemistry","French"])
    Result: 4

Collection Maximum

Returns the item with the highest value in the collection.

CollectionMaximum([Numbers])
ParameterRequiredTypeDescription
NumbersYesNumber ListThe list of numbers to find the maximum value between them.
Return valueNumberThe result of adding the two numbers.
  • Example
     CollectionMaximum([-12.4,43.5,11.8,7.4,55.8])
    Result: 55.8

Collection Minimum

Returns the item with the lowest value in the collection.

CollectionMinimum([Numbers])
ParameterRequiredTypeDescription
NumbersYesNumber ListThe list of numbers to find the minimum value between them.
Return valueNumberThe result of adding the two numbers.
  • Example
     CollectionMinimum([12.4,43.5,11.8,7.4,55.8])
    Result: 7.4

Collection Sum

Returns the sum of all the elements in a numbers collection.

CollectionSum([Numbers])
ParameterRequiredTypeDescription
NumbersYesNumber ListThe list of numbers to calculate their summation.
Return valueNumberThe result of adding the two numbers.
  • Example
     CollectionSum([22,6,11,5,9,11,32])
    Result: 96

Projection

Filter

What's Next

In this section, we've explored various collection functions in Flux logic and learned how to apply them effectively. In the next section, we'll delve into the Flux Logic Blocks, their different type, how they work and how can we utilize them effectively.