New Row on Top - Options

Hi,

Is there any option to set the “add new row” to be added on top besides adding a “created on” column and sort by it?

Thanks.

Dear @Alexandru_Dan,

The RowID() will be your friend, when adding a new row, this will have always be the row with the highest RowID.

Hi, Jean Pierre,

As a newly coda user, of course I have some issue adapting :slight_smile: . I’ve tried to find the formula by searching here and there and, as far as I can see, without success.

I’ve created the “Row ID” column and used this formula.

image

Any help, c/p, or research link would be helpful.

Best!

Is there a functional benefit that the “created on” and sort doesn’t account for? You can also hide the column.
The rowID should autoincrement to the last rowID +1.

@Irfan_Khan - Fair question. I’m just learning Coda and I wanted to see if there’s a different approach, just to improve my perception. I was thinking about situations where there’s another sorting activated by default.

Regarding the RowID i understand the process, but I couldn’t find the right formula to properly call the RowID.

i dont think you need to call it. im just using assumptions here but just create a row and it should automatically assign one.

in your example you are asking to create a row with AddRow. then you define the Table. Optionally tell it to prefill columns. in your case you chose the RowID button. for the value to fill with the RowID(thisRow).

IF this is a button in a row, this will add the value of the row you are currently on. This will try to duplicate the rowid. but its just inserting an integer into the column. You arent using the real row id, that isnt available to see. you are simply having a fake rowID column. you can certainly sort by this column but you need to create a math formula to take the last row and add one. If you are going through the effort of creating something where the newest, simply using “Created date/time” is much easier because its already doing that math for you.

If you are creating a stand alone button on canvas, then the (thisRow) part wont work because its not in a table.

1 Like

It seems that the table doesn’t need to be sorted on “created on column” when pushing the “create new task” button. It’s needed only when I am adding a row through the “+” button between the rows.

Thank you for your counseling.

Best regards!

Hi @Alexandru_Dan , @Jean_Pierre_Traets is correct the RowID() is your friend on this. The way to find it in your table is to change the column type as you would normally, but go all the way down to the properties option, in there you should se “123 Row ID.” This will pull the ID you are looking for.