Custom Sort

I have 4 menu categories that I want to show sorted in the following order. I have tried to sort by a number of options, but nothing works.

  1. Appetizer/Starter
  2. Entree,Sides
  3. Drinks & Beverage
  4. Deserts/Sweets

How and where would I set up a custom sort to make sure it shows up in the above order?

1 Like

Create a helper column with these numbers and sort using this column in the ascending order.

Create a second column called Sort and enter 1-4 respectively.

This is an inline relation list, so where would I add the column?

In the sheet containing those 4 categories.

I did it there, but I column does not show in the sort options.

Screenshots would help :upside_down_face:

In the first image you have a “New Column” that’s the relation. Is this the same relation you are trying to sort and the same relation labeled “Menu Relations” in the second image?


You’ll need to do one of two things, then:

  1. Do an inline list of the “Menu Category” sheet, not the relation
  2. If you want to use the relation, you’ll need to insert the sort numbers (via formula) dynamically in the menu items sheet ("If category is appetizer then 1…etc.)

Here is the menu sheet, so which sheet should I add the formula?

Depends. Are you organizing just the 5 categories in that order or are you organizing all the menu items in that order?

I want each truck ment to be categorized in this order, so no matter which truck the user clicks on, the menu will sort in this order.

To sort the menu items in this order, you’ll need to add the if-then-else column to the menu sheet (last photo you shared).

The Sort filter also has a “Sheet order” option - are you seeing that? It shows up at the top of the list so you have to scroll up. I use it in a lot of my inline lists where the sequence I want isn’t alphabetical (see the list that starts with “Indoor seating” in the screenshot):

Right…problem is, as I’m guessing, is that the Menu Items are submitted via form entry and thus the app owner has no control over the sheet order. Having an if-then-else to assign a 1-5 number will solve this.

I do this with Dates, too. Sometimes I want to sort user-submitted posts by date, but I also want “pinned/featured” posts on the top. So, I create an if-then-else column called “Sort”. If I’m sorting by date with oldest on top, I do an “if Featured then -1 else date” if I want descending with newest on top then I do “if Featured then 99999 else date”.

Then I sort by “Sort”. Here’s the result:

Entry will be by a choice list (via another app using the same sheet) of the items mentioned previously, and no control over the sheet order.

I am still confused on what data to use for the if-then-else function.

It seems I am getting limited optins for the if-then

Is your “Menu Category” an array column?