Shape · Rows
Add Row Number
Numbers the rows 1, 2, 3… in a new column. You can sort first and restart the count in each group.
Also known as: Record ID, row_number
How it works
Group by restarts the count for each value of the chosen columns, so the first row of every group gets the starting number. Order by sorts the rows before numbering; blank numbers them in source order. Output column names the new column, row_number by default, and Start at chooses 0 or 1.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of Add Row Number, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
outputColumn: string
startAt: 0|1
orderBy?: [{ column: string, direction: "asc"|"desc" }]
groupBy?: string[]
}
Example
Which order of each customer's history each row is: Group by customer_id, Order by order_date ascending, Output column order_seq.
| customer_id | order_date | order_seq |
|---|---|---|
| 17 | 2026-01-04 | 1 |
| 17 | 2026-02-11 | 2 |
| 23 | 2026-01-09 | 1 |