RowId
Share
Explore

icon picker
RowId

Formula: RowId()
Category: Relational
add-row.svg
RowId()
Outputs a row’s unique identification number
It’s kind of like saying...
Hey Coda, I know each row has their own, unchangeable ID number. I’ll give you a bit more information to output the one I want.

RowId() has one parameter:
row.svg
Row

RowID(Row)

The row for which you want an ID. Most often ThisRow or a formula to designate a row or rows.


RowId() was created so each row would have a unique identifier. The assigned identifier is the original row number in that table (i.e., the first row is assigned “1” as the ID, the second row as “2”, and so forth). This identifier (the row’s ID) is permanently linked to that row, and it cannot be removed or changed. This means that if a row is deleted, that ID cannot be taken by another row in that table. Let’s see an example:

Click the button below a few times. Notice how the ID for each row stays the same regardless of what rows you delete or add. The row’s ID is captured in the ID column.

Delete and Add Rows

1
2
3
4
ID
Product
Cost
1
Pencil
$21.00
2
Paper
$35.00
3
Motorola DynaTAC 8000X
$193.00
4
Eraser
$29.00
There are no rows in this table

But Why Is This Helpful?

Assigning each row a unique identifier is crucial in maintaining the integrity of your data, especially in dealing with large volumes of data that require unique identifications.
Take, for example, this list of patients in a hospital. Each person requires their own medical record number (MRN).
Click the button below to see how each patient is automatically assigned an MRN, leaving very little room for human error!
Add Patient

Medical Record Number
Patient Name
Room #
Admission Status
Interaction Notes
1
22840
Scott Weir
114
Admitted
Open
2
22841
Morgan Lott
115
Discharged
Open
3
22842
Stuart Weir
119
Preadmit
Open
There are no rows in this table
Now, regardless of how many patients you have, you will always and forever have a specific, non-replicable ID associated with this individual.

Where Else Can I Use This?

Well, pretty much anywhere you need to maintain a constant, non-replicable ID number for a database row:
When creating different order or shipping numbers
Student identification numbers
Creating invoices for customers


Done
Done
Done

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.