0

Count Sum Items in Collection

  • updated 3 yrs ago

Description

The list_count part returns the count, sum, or iterated count of items in a single or multi-dimensional array.

Use

You can use this part to gain insight into the data held in a collection. When you choose the SUM mode, the part cycles through a simple collection of items (1...2....etc.) and presents the sum of those items when the item is numeric. When you choose COUNT or ITERATED COUNT, the system counts the number of items cycled through based on their index (count) or non-indexed (iterative count) nature.

When the count of items in a collection equals zero, this indicates the collection is empty. This can be a useful variable to incorporate into a rule that can be used in directing the pathway (if the collection is not empty, then process items in the collection, otherwise proceed down alternative path). Note that for indexed collections (collection[1].item, collection[2].item....) it is more efficient to just check whether the first item is empty (collection[1].item is not "")

Editor Fields

Field Name

Description/Use

Type/Options 

Optional/Mandatory 

Data object

Object name where the returned value will be stored.

Text

Mandatory

Collection

Name of the collection containing the object items to be counted or summed up.

Collection

Mandatory

Mode

Selector allowing the choice of count or sum or iterated count.

Dropdown

Mandatory

Value field

This option only applies to SUM mode. Specify the particular (numeric) dimension in the array to calculate the sum of all values of that dimension.

Text

Optional

Big number calculation

Checking this box enables the part to sum across "big numbers" - those that cannot be represented in 32 bits.

Checkbox

Optional

 

Example

Download and import the following example project in your workspace. This example is the How to Guide for Collections and focuses on sum and count on one of the tabs.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 3 yrs agoLast active
  • 39Views
  • 3 Following

Home