Skip to main content

Collection Functions

Collection Functions in FlowOn 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

Projects elements of a collection into a new form. This operation transforms each element in a collection based on a specified projection function, resulting in a new collection with the transformed elements.

Project([Collection], ProjectionFunction)
ParameterRequiredTypeDescription
CollectionYesCollectionThe collection of elements to be projected.
ProjectionFunctionYesFunctionA function that specifies how to transform each element in the collection.
Return valueCollectionA new collection containing the transformed

Filter

Filters elements of a collection based on a specified predicate. Only elements that satisfy the predicate are included in the resulting collection.

Filter([Collection], Predicate)
ParameterRequiredTypeDescription
CollectionYesCollectionThe collection of elements to be filtered.
PredicateYesFunctionA function that tests each element for a condition.
Return valueCollectionA new collection containing only the elements that satisfy the predicate.

What's Next

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