Auto Generating a number

Hi is there a way to create an auto generating number to populate in a row? I have done thisRow.Row() it keeps creating 1
Ex. if I created a doc that to added new work orders that it would auto generate a work order order number. I.E: 1,2,3,4,5

Screenshot (1)

1 Like

Hi @Carmen_Cruz,

And welcome to the Coda Community!

Every row has an associated “RowID” that does not change, so this is great to use for a standard reference that doesn’t change over time or by adding or deleting rows.

I a new column just add this formula and you’ll see the RowID…

RowId(thisRow)

You can also get creative and do things like prefix this with something else to extend the number…

Concatenate(Today().Year()," - ",RowId(thisRow))

This would give you the current year and RowID: 2020 - 5

1 Like

Hey Ben,

Thanks for the reply but this still gives me a 1 at the end, any idea?
Screenshot (2)

Can you copy and paste the formula you’re using here?

Would you mind using the “?” icon at the bottom right and writing into Coda Support. You can share the doc there and we can take a closer look at what is going on. You can mention me and they can route the ticket to my way if you want.

1 Like

A technique I commonly use is to create a hidden page of named formulas

One such named formula could be NextAvailableID which is a formula that uses ‘MyIDColumn.max() + 1’

Next set the MyIDColumn default value when a new row is created to NextAvailableID.

1 Like