New row numbers for each view

I am new to coda. Please check the screenshot below:

I have used =rowID(thisRow) on Table 1 to calculate the S.N. automatically. But how can I reset the numbering for the view of Table 1? I want the numbers to be 1, 2, 3.
How can i do this? The 2nd table is linked to the main table “Table 1”.

or

The yellow highlighted numbers appear only when i hover my mouse above it. Is there a way to keep it always visible?

Regards

Hi @fei there are quite a few posts in the community about how row IDs work. The yellow highlights you see is showing you the ‘rank’ for that view. That is dynamic, since you can sort tables, so it will change depending on the view.

You can also drag and drop the rows to re-order them. The rowID() is a unique identifier for each row. If you are ‘perfect’ when you create a table and never delete or re order them, they will stay sequential, but otherwise they will probably ‘get out of order’.

I don’t think there is a way to ‘reset’ the numbering.

Hi @fei,
and welcome to Coda Community :handshake:

as @Johg_Ananda was suggesting, RowId() (https://coda.io/formulas#RowId) is sequential for each row and keep on increasing even if you delete rows.
Rank() (https://coda.io/formulas#Rank) is also a function allowing to keep ordering position, so you can

keep the ranking always visible

by adding a column with this formula:

  • Rank(thisRow.[S.N.],thisTable.[S.N.],true)
    (assuming S.N. is RowId(thisRow)).

However, it is not clear to me what this S.N. would represent to you if the two tables should be linked - therefore it’s a filtered view.
You could have the specific rank for the view, too:

  • (Rank(thisRow.[S.N.],thisTable.Filter(--the-filter-of-your-view--).[S.N.],true ))

But why this…? :thinking:

Am I missing something?

1 Like

Thank you @Federico_Stefanato and @Johg_Ananda for your reply.

@Federico_Stefanato

Please check my new example file below (i am not sure if this is the right way to share my document):

I used the rank option on my main table. It is “OK” but is not exactly what I want.

So as on this screenshot above, If i add new row in between 5 and 6, I want ‘6’ to appear on rank instead of 12. (or reset the Rank??).
If there is a way to set “always visible/ON” to the numbers (on the side) that appear only when i hover my mouse, it would solve my problem…

And for the filtered view,
the formula you provided me gave me the same result as of the main Table.

rank_John = rank(thisRow.[rowID_All orders],thisTable.Filter([Only for John]).[rowID_All orders],true)

I believe I have to use filter for thisRow too, but I was not able to figure out the correct formula.

And same applies to this view too, if there is a possibility to make those highlighted number “always appear”, it’ll work for me.

I want each table / view to have a continuous number (1,2, 3, etc for all rows). So that when I share my table or view to someone (my sellers for example) via screenshot or email button, it makes more sense if i say “please check the 3rd row” instead of saying “check the row labeled 12”.

Sorry if I am being silly here. In excel, i would have done something like below (use auto-fill to reset numbering):
image
Is there something like this in Coda?

Regards
Fei

This is what I was looking for:

I understood your point :+1:
And happy you found out your solution!

2 Likes