Skip to main content

List Math

Runs on: Shared — pure logic, runs on the Community backend or inside a chatbox overlay.

The List Math node computes Sum, Average, Min, or Max across a list of numbers, or across one number field of a list of objects. Numbers and numeric-looking text (like "42") count; anything else — text, booleans, or an object with no resolvable field — is skipped.

Min and Max also output the entry that held the winning value (the first one, on a tie), so you can answer "who has the top score", not just what the top score is.

Inputs​

NameTypeDescription
listlistThe list to compute over.
fieldstringOptional. Wire this to choose the number field at runtime instead of picking it in the node. Required in the node for lists of objects.

Outputs​

NameTypeDescription
resultnumberThe computed value. 0 for an empty list or one with no numeric values.
item(item type)Min/Max only: the entry that held the winning value. Not sent for Sum/Average, and not sent when there are no numeric values.

Configuration​

  • Operation: Sum, Average, Min, or Max.
  • Field: required for lists of objects — Math needs to know which number field to read. Not shown for lists of plain numbers.

Example​

Feed a broadcaster leaderboard variable into List Math with Operation set to Max and Field set to score to find the current top scorer — wire item into List To Text to announce {{item.username}} is in the lead with {{item.score}} points!.