Custom sort formula

I’ve got a couple of docs where a custom sort would be extremely valuable.

  1. CRM. I am tracking financial commitments, and I have a stage column (Hard, Soft, Interested, No).
    The stage is a different table lookup, and that table has the rows in the order that I described. If I sort my CRM table based on stage, I expect it to be sorted in that order, but instead I get alphabetical order which is thoroughly meaningless in this context.

  2. Project tracking. I have a doc where we track our feature requirements and our progress on those features. In that doc, I have a table for all the feature and a column for how important it is (baseline, MVP, release target, nice to have). Again, I want to sort by that column in the order that I just listed, but it does it in alphabetical order.

Current workarounds are not acceptable:
I could edit each of the entries in the lookup to be like “1. baseline”, “2. MVP”, etc. and then sort, but that creates a lot of extra clutter and extra work. I would have to renumber all of them every time I insert an intermediate stage

I could use group-by and manually rearrange the groups, but group-by is a clunky user experience because it is extremely difficult to add a new group (easiest way seems to be add a new row in one of the existing groups, full-screen/expand that row, then change the value of grouped column from the dropdown, then exit the full-screen/expanded view)

Hi @Nikil_Ragav :blush: ,

If you already use lookup field for your various stages (and others), you can easily attribute a number to each stage you wish to sort your principal table later…

Here’s a very very very quick sample to illustrate what I mean :innocent: :

In the sample, you’ll find 2 tables: the “Principal” one called simply Tests and another called Stages where I gave, each stage a number.

This table is linked by a LookUp field to the Tests table where I gave each Test a Stage.

To sort the Tests table depending on the “order” I gave to each stage, I simply added the Related ColumnSort (from the Stages table) and used that column to sort my Tests table :blush: .
The column can be hidden if necessary :innocent:

This can be done with tables and lookup fields… But for groups, it can be a little bit more tricky though (If I remember correctly :sweat_smile: )

Hope this helps :innocent:

1 Like

Yeah! Also @Nikil_Ragav - on your “Stage” column, you can make it Auto-Number so that it always catches new Stages added later with this formula:

thisTable.find(thisRow)
3 Likes

Indeed :blush: ! Doing too many things at the same time, I forgot to mention this :innocent:

Thanks @Scott_Collier-Weir :raised_hands: :grin: !

2 Likes

Ah right I’ve used it before but forgot the actual formula.

Yea, ok so I suppose this can be achieved by adding the related column as @Pch has suggested and then sorting by the related column.

Functional, but cumbersome.

1 Like