Consecutive rows in a table - name + number

Hi all! I’m building a table to add control of my workout. I’m triying to autofill the name column “Set number” consecutive everytime I add a new row. Something like this:

I try to use Concatenate("Set ",thisRow.RowId()) but if I delete a row and add a new one, it skips the number. I also try to use Concatenate("Set ", Nth(thisTable.[Column 1],thisTable.[Column 1].Count())+1) but here the results are:

Set 4
Set 41
Set 411

Does anyone know how to solve this? Thanks in advance=

1 Like

Hi @Steve_Calderon and Welcome to the Community :partying_face: !

I think this might help you :blush:

Concatenate("Set ",thisTable.Find(thisRow))

With this thisTable.Find(thisRow) here, we’re asking Coda to Find() the position of thisRow in thisTable.

RowId() returns the unique ID of a row from Coda’s side :blush: (hence why when you delete a row, that ID is not re-attributed anymore)

3 Likes

Hi @Pch thank you so much for the welcome and your quick answer!

I don’t know if I’m doing something wrong, but the formula that you gave me only works if the rows are empty, but when I add a new row it shows

“Set -1”

Empty rows if I select “Apply to 4 blank rows” it works very well
Captura de Pantalla 2022-08-29 a la(s) 12.14.09 p.m.

However when I add a new row it happens the Set -1 thing
Captura de Pantalla 2022-08-29 a la(s) 12.16.42 p.m.

Hi @Steve_Calderon :blush: !

It works as a field formula (which you can add by clicking on Add formula from your 1st screenshot in your last reply), not in the Value for new rows :blush: .

You won’t be able to manually edit the values in the field but this is the easiest way I know to get the result your looking for :blush: .

1 Like

Works like a charm! thank you so much for your help :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.