One time sort (airtable style)

In airtable you can do a one do a one time sort based on attribute value, but not “keep it sorted”. The idea here is to 1) Modify the intrinsic order, which is useful for “table order” option in lookup tables, and 2) Allow further manual sorting which isn’t possible if you have a sort attribute defined.

Is this possible in Coda?

i have had to do this once before.
i used a button that loaded all the rows into a temporary matrix, sorted the matrix, deleted the rows in the table and re-wrote the table from the matrix.

it did not physically delete the old rows until the new ones were written (for safety, in case anything happened during the process). it ‘flagged’ the rows as logically deleted using a checkbox column. then it actually deleted the flagged rows at the end of the process.

i will find the code and publish here.

BUT we no longer use that approach!

now we would add a separate sort column just for the purpose. indeed we often have several sort columns.

each view of the table can then use its own sort column to show the data in the required order.

this way is more flexible and more safe.

we always keep the ‘raw’ table unsorted so that new rows are added to the end. so we only apply sorting to views


I came up with a pretty neat formula for a one time sort here

Table.Sort().ForEach(RunActions(CurrentValue.DuplicateRows(), CurrentValue.DeleteRows()))

Hmm it seems that these approaches broke lookup references :frowning_face: We might need some support from the core coda team to make it happen it seems.

You’re right that’s gonna break references. I’d recommend @Xyzor_Max’s approach then. But yes it seems there’s a functionality missing here

Yea it works if there is an easy sort column, but sometimes there isn’t (for example, I want to be able to quickly reorder tasks based on priority)

I think my recent extension will be able to solve this :slight_smile:

My code already can modify intrinsic order, albeit only one row at a time (but it shouldn’t be hard to add a bulk update method)

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