# RowID unreliable when adding multiple rows

**URL:** <https://connect.superhuman.com/t/rowid-unreliable-when-adding-multiple-rows/10136>\
**Category:** Bugs\
**Created:** [August 29, 2019, 4:51pm UTC](https://connect.superhuman.com/t/rowid-unreliable-when-adding-multiple-rows/10136 "2019-08-29T16:51:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Filmos](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/filmos/32/9322_2.png) [@Filmos](https://connect.superhuman.com/u/Filmos)\
**Post date:** [August 29, 2019, 4:51pm UTC](https://connect.superhuman.com/t/rowid-unreliable-when-adding-multiple-rows/10136/1 "2019-08-29T16:51:43Z")

</div>

When adding multiple rows at once using `FormulaMap`, the `RowID` formula is extremely unreliable.  
Not only does it work after a delay, but it also appears one row at a time.  
This means that, if you have other columns dependent on the `RowID` formula, the calculating looks something like this:  
`Add multiple rows --> calculate all formulas --> update RowID of the first row --> recalculate everything --> update RowID of the second row --> recalculate everything -->...`  
This can create formula chains which takes **hours** to calculate.  
What’s more, because this is a lot of quick formulas instead of a single long one, the `disable calculations` buttons doesn’t show up and even [hard reloading the tab](https://connect.superhuman.com/t/heres-what-to-do-with-endless-calculations-with-very-large-docs-lessons-with-large-docs/9555) won’t help you, after the reload it will continue calculating.

A simple workaround would be to [create your own id for each row when creating it](https://connect.superhuman.com/t/how-to-add-multiple-rows-to-a-table-with-formulamap-with-a-value-that-increases-by-1-in-each-row/9813/3) instead of relying on the `RowID` function.  
But this is still a huge issue which is hard to debug and can cause an enormous of headache and frustration.

And here is a demo which illustrates what I mean:  
https://coda.io/embed/ZP_LVovPpp?viewMode=embedplay

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [September 3, 2019, 1:33pm UTC](https://connect.superhuman.com/t/rowid-unreliable-when-adding-multiple-rows/10136/2 "2019-09-03T13:33:47Z")

</div>

I solved this by adding an ‘action’ that waits until all RowIDs have been assigned. Hold on, I’ll post the demo doc later today.

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [September 4, 2019, 9:54pm UTC](https://connect.superhuman.com/t/rowid-unreliable-when-adding-multiple-rows/10136/3 "2019-09-04T21:54:07Z")

</div>

Here @Filmos

> [@Waiting for the rows to be saved to Coda (for Row IDs to be assigned)](https://connect.superhuman.com/t/waiting-for-the-rows-to-be-saved-to-coda-for-row-ids-to-be-assigned/10251):
>
> When you create many rows at once in Coda (or lately, even one or two), their Row IDs are not assigned immediately but after some time. I assume that this happens because Coda needs to store the row on the backend first. It also applies some rate limiting, that’s why if you create lots of rows, their Row IDs will only appear one after one with some delay. You can observe this behavior by clicking the Create 20 rows button and looking at the Data table. Sometimes though you need to perform some …

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [March 1, 2020, 5:52pm UTC](https://connect.superhuman.com/t/rowid-unreliable-when-adding-multiple-rows/10136/4 "2020-03-01T17:52:18Z")

</div>

An update to solving this problem: just use UIDs instead of Row IDs:

> [@PSA: Link to recently created rows by UID, not RowID()](https://connect.superhuman.com/t/psa-link-to-recently-created-rows-by-uid-not-rowid/14170):
>
> Requirement: with a button create a row and bring it up into focus (e.g. [as a modal](https://connect.superhuman.com/t/mega-trick-different-expand-row-layouts-for-the-same-row/14143)) Problem: to bring out a row into focus, you need its RowID() so that you could construct its URL like: OpenWindow(Format("#\_tu9Wb/r{1}&modal=true", CreatedRow.RowID()) However, RowID() at this point may still be blank because the row is [not yet stored to the server](https://connect.superhuman.com/t/waiting-for-the-rows-to-be-saved-to-coda-for-row-ids-to-be-assigned/10251). And it will always stay blank if the doc is used in Play mode. Solution: instead of RowID() use “true” 10-alphadigit unique row ID (UID) that is…
