List Mode
Returns the most frequent item of a list.
List Mode returns the item that appears most often in a list. Use it to find the best-selling product in a list of order lines, the customer with the most tickets, or the most common answer in a survey.
Add the action
In the Process Designer toolbox, open Community-Made and pick List Mode (or type List Mode in the search box).

Inputs and outputs
| Field | Direction | Type | Required | What to put / what you get |
|---|---|---|---|---|
| List of elements | Input | List (any type) | Yes | The list to look at. Map a list variable. |
| Mode | Output | Any type | Yes | The most frequent item. |
Example
| List of elements | Mode |
|---|---|
[3, 1, 3, 2, 3, 1] | 3 |
["b", "a", "a", "b"] | "b" (a tie: the first one in the list wins) |
[{"a":1}, {"a":1}, {"b":2}] | {"a":1} |
[] | empty |
Good to know
- Ties: when several items appear equally often, you get the one that appears first in the list.
- An empty list does not stop the step; Mode is simply empty. Check it before you use it.
- Text is compared exactly, case included.
Related actions
Creator
Franck, The Productivity Lab

