Sort Inline list by number value

Currently, the “Sort” function in Inline list sorts by alphanumeric list, and there is no option to sort via numbers.

For example, this list:
3
5
2
1
14
24

Will be sorted as:
1
14
2
24
3
5

But, I would like the option to sort via numbers, so it will look like this:
1
2
3
5
14
24

You need to pad you numbers like this: =text(H3, “000000”). That way all of the numbers are the same length and will sort properly.

1 Like

Yeah I did that already. But I have a columns that work with this data so I had to create a separate columns which is a bit of a pain when the solution is very simple.

What is the simple solution you are referring to?

The simple solution is to have an option on the “sort” function to sort via “number value”.

This is similar to the update that glide made to the “filter” function to allow “empty” “is not”, “not empty” etc, whereas originally only had “is”.

I’m guessing it’s a little more complicated because I assume that glide treats all columns in the database as strings. To sort by number, all string values would have to be converted to decimal or integer values. Then there needs to be error handling if the value is not a valid number. Probably not too bad to program, but not completely cut and dried.

Numeric sort should actually work already as expected, we simply are using the wrong icon to show the sort direction

@david what do you mean? It isn’t working for me. See the screenshot below. The column that is being sorted is “submitted” but you can see that it is not displayed in the correct order.

You can see that it is sorting by character, not numeric value. (That’s why the “$95” is first, but the “$11,600” is last).

Ah, I see. Yes, Glide does not understand currency values as numbers yet. If your column were formatted as a number (no currency symbol) then Glide could sort it. You can mirror your currency column with e.g. ={A2:A} then format it as a simple number, then sort on that.

1 Like

@david still doesn’t sort, even after changing the column to simple numbers. You can see in thescreenshot that they are simple numbers, not currency.

38

Would you mind sharing your app, please?

@Mark I just sent you a PM with link to the app