List Count
List Count
Section titled “List Count”Type: list-count · Package: Collections Activities v1.0.3 · Output: int
Gets how many elements a list has.
How it works
Section titled “How it works”Counts the elements of list (including null ones) and returns the number. It does not modify the list.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
list | List | — | The list. |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”Returns an int with the number of elements; 0 if the list is empty.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'list' must be a List, got …. | list is not a list (the message shows the type received, or null if the variable is empty). |
Example
Section titled “Example”List Count list = pending → output: totalIf condition = total > 0 └─ then: Log message = "There are " + total + " pending"Related activities
Section titled “Related activities”- Get List Item — read an element by index.
- List Contains — check whether an element is there.