Skip to main content

Collection Functions

Functions for aggregate operations on lists and collections.

Collection Count

Counts the number of items in a collection.

PropertyValue
CategoryCollection Utilities
Min Arguments1
Returnsinteger

Arguments:

#NameTypeDescription
0Collectionlist of integer, float, decimal, moneyCollection to count

Example:

Collection Count(LineItems) → number of line items
Collection Count(Participants) → number of participants
Collection Count(Errors) → number of errors found

Collection Sum

Returns the sum of all elements in a numeric collection.

PropertyValue
CategoryCollection Utilities
Min Arguments1
ReturnsHighest weight numeric type

Arguments:

#NameTypeDescription
0Collectionlist of integer, float, decimal, moneyCollection to sum

Example:

Collection Sum(LineItemTotals) → order total
Collection Sum(Scores) → total score
Collection Sum(Payments) → total payments received

Collection Average

Returns the average of all elements in a numeric collection.

PropertyValue
CategoryCollection Utilities
Min Arguments1
ReturnsHighest weight numeric type

Arguments:

#NameTypeDescription
0Collectionlist of integer, float, decimal, moneyCollection to average

Example:

Collection Average(TestScores) → average score
Collection Average(Ratings) → average rating
Collection Average(ResponseTimes) → average response time

Collection Maximum

Returns the highest value in a collection.

PropertyValue
CategoryCollection Utilities
Min Arguments1
ReturnsHighest weight numeric type

Arguments:

#NameTypeDescription
0Collectionlist of integer, float, decimal, moneyCollection to search

Example:

Collection Maximum(Prices) → highest price
Collection Maximum(Bids) → winning bid
Collection Maximum(Temperatures) → peak temperature

Collection Minimum

Returns the lowest value in a collection.

PropertyValue
CategoryCollection Utilities
Min Arguments1
ReturnsHighest weight numeric type

Arguments:

#NameTypeDescription
0Collectionlist of integer, float, decimal, moneyCollection to search

Example:

Collection Minimum(Prices) → lowest price
Collection Minimum(StockLevels) → minimum stock level
Collection Minimum(Scores) → lowest score

Collection Functions Quick Reference

FunctionReturnsUse Case
Collection CountintegerHow many items in the list
Collection SumnumericTotal of all values
Collection AveragenumericMean of all values
Collection MaximumnumericHighest value
Collection MinimumnumericLowest value

Common Patterns

Order Total Calculation:

Collection Sum(LineItemAmounts)

Checking if Collection Has Items:

Is Greater Than(Collection Count(Items), 0)
// Or simply use: Any(Items)

Average with Minimum Check:

If Condition(
Is Greater Than(Collection Count(Scores), 0),
Collection Average(Scores),
0
)

Range Validation:

And(
Is Greater Than Or Equal To(Collection Minimum(Values), MinAllowed),
Is Less Than Or Equal To(Collection Maximum(Values), MaxAllowed)
)

Statistical Summary:

Format("Count: {0}, Sum: {1}, Avg: {2}, Min: {3}, Max: {4}",
Collection Count(Values),
Collection Sum(Values),
Collection Average(Values),
Collection Minimum(Values),
Collection Maximum(Values)
)