Elementium Sign in
Contents

Data tables · Step

Add up a value

The total, count and average of one value across a table's rows.

Basic plan table.total

In a flow

“When a button is clicked, add up a value.”

/hours → Add up hours in shifts → Reply: {node.t.total} hours from {node.t.count} shifts.

What it does

The total, count and average of one value across a table's rows. It's a step: it runs when the white wire reaches it, then the flow carries on from its Then pin. It gives 3 values later steps can use. Find it under Data tables in the palette.

When to use it

Use it to keep rows of data, like a spreadsheet: the total, count and average of one value across a table's rows.

When not to

If nothing should change in Discord, a value node or a check is lighter.

Typical wiring

Values it gives

Total Number

Everything added up. e.g. 42.5

If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.

Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 719 more

Rows Number

How many rows had a number. e.g. 12

If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.

Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 719 more

Average Number

The total over the rows. e.g. 3.54

If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.

Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 719 more

Often next

Related in Data tables

Wires and sockets · Data values · Plans