# Getting Actual Row ID Within Coda

**URL:** <https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321>\
**Category:** Ask the Community\
**Created:** [February 14, 2019, 5:44pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321 "2019-02-14T17:44:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murray\_Adcock](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/murray_adcock/32/9288_2.png) [@Murray\_Adcock](https://connect.superhuman.com/u/Murray_Adcock)\
**Post date:** [February 14, 2019, 5:44pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/1 "2019-02-14T17:44:53Z")

</div>

So I’m aware that I can use RowID() to return the ID value within the table, but based on the return results from the API this isn’t the same as the actual row ID, it’s actually the index (at least I think so).

I need the actual “id” i.e. “i-ft58426d56a2dds” to be accessible from within the table, so that I can use it in a webhook. Is that possible?

---

<div class="post-metadata">

**Author:** ![Krunal\_Sheth](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/krunal_sheth/32/5936_2.png) [@Krunal\_Sheth](https://connect.superhuman.com/u/Krunal_Sheth)\
**Post date:** [February 15, 2019, 12:46am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/2 "2019-02-15T00:46:57Z")

</div>

Hi @Murray_Adcock,

🙂 no we dont expose it anywhere - are you looking to access same row every time ? you could give it a name and use that way through api - you dont need an internal row id for that.

our api to access row is `https://coda.io/apis/v1beta1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}`

more info here: [https://coda.io/developers/apis/v1beta1#operation/upsertRows](https://coda.io/developers/apis/v1beta1#operation/upsertRows)

Thank you.

---

<div class="post-metadata">

**Author:** ![Murray\_Adcock](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/murray_adcock/32/9288_2.png) [@Murray\_Adcock](https://connect.superhuman.com/u/Murray_Adcock)\
**Post date:** [February 15, 2019, 9:00am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/3 "2019-02-15T09:00:18Z")

</div>

Thanks, but the name is a little too tricky. There could be multiple rows with the same title at the moment, plus it’s a user editable field. Does the “name” have to be the tagged column? If not, I could just create a column with a guaranteed unique field.

To be clear, I’m looking to set up a button that links to a webhook and passes information to a third-party tool, which manipulates it and passes it back (effectively a Zapier “Zap” like interaction, but without Zapier as we don’t want to migrate to that system); I want the passed back value to go to the row on which the button was triggered. Whilst the interaction should be fairly instantaneous, we have a number of people working on this doc simultaneously, so it’s certainly possible that the tagged column get change without someone realising.

EDIT: Actually, thinking about this more closely, it’s a guarantee that we will have identical names within the data set. I’m using the table as a cross-channel content scheduler, storing everything from long-form articles to social media posts, but we have functionality where you can “push” an article to social media and use the fact that the “name” is the same to track that relationship. I’ll be able to use “name” for genuinely instant interactions, but any kind of long-form tracking requires access to the ID, so it’s a shame I can’t access it from within Coda directly.

---

<div class="post-metadata">

**Author:** ![Krunal\_Sheth](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/krunal_sheth/32/5936_2.png) [@Krunal\_Sheth](https://connect.superhuman.com/u/Krunal_Sheth)\
**Post date:** [February 15, 2019, 8:57pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/4 "2019-02-15T20:57:25Z")

</div>

Hi @Murray_Adcock,

Thanks for highlighting your use case. I am asking folks on the team more familiar with this area to figure out how we can help.

For now, here’s a workaround that could help. (not ideal, but may be as a stop gap measure?)

1. Open record in detail view (like here [https://cl.ly/151faea219e2/Screen%2520Recording%25202019-02-15%2520at%252012.56%2520PM.gif](https://cl.ly/151faea219e2/Screen%252520Recording%2525202019-02-15%252520at%25252012.56%252520PM.gif))
2. Once you have a url for the row, you could use `https://coda.io/developers/apis/v1beta1#operation/resolveBrowserLink` to retrieve the URL for the row.

Thank you.

---

<div class="post-metadata">

**Author:** ![Murray\_Adcock](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/murray_adcock/32/9288_2.png) [@Murray\_Adcock](https://connect.superhuman.com/u/Murray_Adcock)\
**Post date:** [February 18, 2019, 10:28am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/5 "2019-02-18T10:28:46Z")

</div>

Interesting, I was looking into ways to do this myself, though again it’s a shame it can’t be (easily) automated. I was wondering if there might be a way to resolve the link directly in a function. Will continue looking into it 😉

---

<div class="post-metadata">

**Author:** ![Ian\_Nicholson](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ian_nicholson/32/7561_2.png) [@Ian\_Nicholson](https://connect.superhuman.com/u/Ian_Nicholson)\
**Post date:** [April 20, 2019, 1:01am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/6 "2019-04-20T01:01:47Z")

</div>

Could you use the following formula in a hidden field as your makeshift ID?

`Middle(Random(false),3,16)`

---

<div class="post-metadata">

**Author:** ![Christian\_Rodriguez1](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/christian_rodriguez1/32/7212_2.png) [@Christian\_Rodriguez1](https://connect.superhuman.com/u/Christian_Rodriguez1)\
**Post date:** [January 20, 2020, 6:51pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/7 "2020-01-20T18:51:05Z")

</div>

+1 – we integrate Coda with other 3rd party systems and want to be able to know that a Customer in QBO with ID qbo123 is the same as the row in Coda with ID coda456 so that when an update is made in one place it can be synchronized elsewhere.

It should be straightforward for y’all to provide us the canonical ID for the row from the interface and would be a huge help without having to add an additional resolution step.

---

<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:** [January 21, 2020, 11:21am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/8 "2020-01-21T11:21:40Z")

</div>

This thread got bumped, so I figured I’d chime in.

> [@Murray\_Adcock](#):
>
> I was wondering if there might be a way to resolve the link directly in a function.

I’m fairly sure that it can be done with the help of `_Merge(thisRow)` hidden function: it shall expose the datastore row ID. Then use `RegexExtract()` to get it out of the json, or use `ParseJson()` alternatively.

I’ll test when I get home

---

<div class="post-metadata">

**Author:** ![Johg\_Ananda](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/johg_ananda/32/13930_2.png) [@Johg\_Ananda](https://connect.superhuman.com/u/Johg_Ananda)\
**Post date:** [January 21, 2020, 4:12pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/9 "2020-01-21T16:12:22Z")

</div>

@Paul_Danyliuk always expanding my mind? What does `merge()` do?

---

<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:** [January 21, 2020, 4:50pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/10 "2020-01-21T16:50:37Z")

</div>

@Johg_Ananda `_Merge(object)` is a hidden formula that’s mostly interesting due to the fact that it allows exposing internal Coda object structure. `_Merge(whatever) + ""` is an idiom to render that as JSON:

 ![image](https://global.discourse-cdn.com/coda1/original/2X/5/5c1754e90790c0b7973b2ce628243ba5e97bad55.png)

Then use e.g. RegexReplace:  
`thisRow.[Column 4].RegexReplace('^.*"identifier":"([^"]+)".*$', "$1")`

to only extract the row ID.

Source: [A somewhat of a documentation of hidden formulas [Added mechanics of nested buttons]](https://connect.superhuman.com/t/a-somewhat-of-a-documentation-of-hidden-formulas-added-mechanics-of-nested-buttons/9831/5)

* * *

@Murray_Adcock Actually while doing this I figured out I could simply try `thisRow + ""`. And voila, it does this:

 ![image](https://global.discourse-cdn.com/coda1/original/2X/c/c6be284b304c742a588151cdd7741214df608a4b.png)

and then just `thisRow.[Column 6].Split("/").Last()` to get the row ID. No hidden formulas required!

@Krunal_Sheth FYI

---

<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:** [January 21, 2020, 4:55pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/11 "2020-01-21T16:55:34Z")

</div>

Although for everyone else’s consideration — what’s wrong with using the good old `thisRow.RowID()`? Except the webhook mentioned in the original post, I don’t see why RowID is not suitable for record matching.

---

<div class="post-metadata">

**Author:** ![Nick\_HE](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nick_he/32/6190_2.png) [@Nick\_HE](https://connect.superhuman.com/u/Nick_HE)\
**Post date:** [January 24, 2020, 2:28am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/12 "2020-01-24T02:28:12Z")

</div>

Great workaround.

+1 for feature request of cleanly exposing the same ID that the API sees. (My use case - a button that packs the row ID into a query string to launch an outside service. CodaAPI.getRow() is expecting this ID; I know I can query a table to find a row, but I suspect that’s less performant?).

---

<div class="post-metadata">

**Author:** ![Aram\_Zadikian](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/aram_zadikian/32/8275_2.png) [@Aram\_Zadikian](https://connect.superhuman.com/u/Aram_Zadikian)\
**Post date:** [February 27, 2020, 1:18am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/13 "2020-02-27T01:18:13Z")

</div>

This is really critical. Our use case is the following.

1. Scan a barcode on a product
2. Lookup a row in a coda doc
3. Update a value

Not being able to easily access the rowId is a major block for us right now. Copying the docUrl manually will be difficult with hundreds of items. Any updates on this?

---

<div class="post-metadata">

**Author:** ![Ben\_Lee](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ben_lee/32/49867_2.png) [@Ben\_Lee](https://connect.superhuman.com/u/Ben_Lee)\
**Post date:** [February 27, 2020, 1:36am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/14 "2020-02-27T01:36:54Z")

</div>

The `RowID(thisRow)` is accessible. What I’m not sure about is the automation of a value changing. If you don’t mind creating a sample doc with some sample info that you’d need included in the URL, we can help with formulas.

---

<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:** [February 27, 2020, 8:31am UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/15 "2020-02-27T08:31:33Z")

</div>

@Aram_Zadikian @Nick_HE et al

The `Split(thisRow + "", "/").Last()` trick works perfectly for me. I’m using it all the time to expose row UID to external docs via Cross-doc to relink entities on the “frontend”.

One of the advantages of UID over `RowID()` is that it’s assigned on the client right away, while RowID requires a round trip to the server, and its assignment may be delayed if you’re adding lots of rows in bulk. (not that you’ll be able to access the unsaved row anyway, but still, a behavior to be aware of, especially if you’re doing linking of items by IDs and not references for some reason).

I just hope Coda doesn’t remove the `+ ""` trick that converts various kinds of objects to strings via Javascript internally. Quite a few of the docs I built for clients now depend on this.

---

<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:55pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/16 "2020-03-01T17:55:06Z")

</div>

A more detailed write-up on retrieving and using actual row IDs (UIDs):

> [@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…

---

<div class="post-metadata">

**Author:** ![Kolbi\_Christianson](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/kolbi_christianson/32/10826_2.png) [@Kolbi\_Christianson](https://connect.superhuman.com/u/Kolbi_Christianson)\
**Post date:** [April 28, 2020, 4:01pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/17 "2020-04-28T16:01:37Z")

</div>

There are significant differences between “RowId” and a “UniqueID” of a record, and I’m concerned they’re being confused a little here. For APIs, I would think it is more relevant to be able to refer to a unique ID than it is to refer to the RowID, considering that the table can be sorted, rearranged, etc. and so change the RowID as it relates to the record itself. In some systems, the record’s unique ID is generated when the record is created, and it behaves like the unique name we should be naming our records with (but which can be difficult sometimes with things like Task Names on standard project methods), giving each record a unique identity.

I would be interested in a unique id similar to what can be generated in Excel:  
=DEC2HEX(RANDBETWEEN(0, 4294967295), 8)  
which results for each cell an ID similar to:  
D1AE30DD  
EC9C4174  
D5DB6A2E  
D4EF1EEC  
0E44CA18

Is there a capability for something like this? @Paul_Danyliuk @Krunal_Sheth  
And am I capturing your original question in what I stated above? @Murray_Adcock

---

<div class="post-metadata">

**Author:** ![Ben\_Lee](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ben_lee/32/49867_2.png) [@Ben\_Lee](https://connect.superhuman.com/u/Ben_Lee)\
**Post date:** [April 28, 2020, 4:53pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/18 "2020-04-28T16:53:53Z")

</div>

I’m not sure why an extra layer is needed other than aesthetics. Just to clarify…

The UID discussed is accessible to the API. This you can see in Paul’s posts about how to retrieve it.

The `RowID()` is a unique value for that row and does not change. This is a more readable value for a lot of applications within the product, but can also be used as a unique value for referencing an exact row within a table. This does not change with sorting and even if you delete a row, you won’t get the same RowID with the next row added.

---

<div class="post-metadata">

**Author:** ![Kolbi\_Christianson](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/kolbi_christianson/32/10826_2.png) [@Kolbi\_Christianson](https://connect.superhuman.com/u/Kolbi_Christianson)\
**Post date:** [April 28, 2020, 6:13pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/19 "2020-04-28T18:13:48Z")

</div>

Perfect, thanks for that clarification!

---

<div class="post-metadata">

**Author:** ![Enoma\_Os](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/enoma_os/32/10195_2.png) [@Enoma\_Os](https://connect.superhuman.com/u/Enoma_Os)\
**Post date:** [July 20, 2021, 11:33pm UTC](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321/20 "2021-07-20T23:33:34Z")

</div>

While this workaround is perfectly stable, I think it’s safe to say that over the years many a reason to use the actual rowID have come up. Is this on the backlog? A straightforward formula would be much appreciated!

[Next page](https://connect.superhuman.com/t/getting-actual-row-id-within-coda/6321.md?page=2)
