Custom sorting of values in Filter View

BGD
Bronze 5
Bronze 5

I have two fields to sort but in certain way in my Filter View.

1. Risk Level as : High, Medium, Low

2. Status as : Not Started, In Progress, Completed, Canceled

for point 2 I tried to use "sort(Select(Ticket[Status],True),True)" expression under Data validity where I tried to sort the field value in descending order which will helps me to resolve my issue. but I don't know why this is not working.

and for point 1 I tried to use Orderby expression but it throw invalid expression error.  

 

Below Image shows my Filter View where I want to sort the values.Screenshot 2023-06-13 at 1.51.12 PM.png

Please share your thoughts as I am new to Google Appsheet. Thank  you in Advance 

0 7 311
7 REPLIES 7

If the columns are defined as Enum and you have included the possible values within the column definition itself, then you simply need to order the values in the column definition list in way you wish them to appear.

Hi Willow ,

Thank you for your response, But here I am getting the column value from another table by using the select expression.

Eine sortierte Liste von Werten aus einer Spalte in einer anderen Tabelle

Beispiel: SORT(LookupTable[ColumnC])

Dabei ist der Name der Tabelle, die die Dropdown-Werte enthält, und der Name der Spalte, die die Dropdown-Werte enthält. LookupTableColumnC

Die Liste der Werte ist in aufsteigender Reihenfolge sortiert. Wenn es stattdessen in absteigender Reihenfolge sein soll, verwenden Sie . SORT(LookupTable[ColumnC], true)

BGD
Bronze 5
Bronze 5

Hi Tommy,

Thank you for your response, I already tried and mentioned in my original post that I used the expression SORT(LookupTable[ColumnC]) but it is not working i dont know why. I can see it works in test view but in the app view its not, please find the snapshot below of test view, my expression and app view

BGD_0-1686771420077.png

BGD_1-1686771431378.png

BGD_2-1686771456389.png

appreciate your time


@BGD wrote:

expression SORT(LookupTable[ColumnC]) but it is not working i dont know why. I can see it works in test view but in the app view its not


So just to be clear, you are pulling values from another table and trying to display them in Descending order as the Status  choice list.   Correct?

If so,  how is that Status column defined?  What is its data type?  

If its a REF column, then the values will be sorted by the key value and not necessarily the displayed text - i.e. the column set as the Label column in that table.  In this case, You would need to use the ORDERBY()  expression instead of SORT.  ORDERBY() allows you to sort the Ref rows by the value in another column.

I hope this helps!

the data type of another table is "enum" and already sort the value in that table same as below screenshot 

BGD_0-1686774293720.png

I tried to use the OrderBy but it throwing me error saying invalid use of orderby

Ah, ok!  The Enum values are configured for THIS column ONLY.  They are not visible anywhere else in the app.  

If you wish to reuse this list to make sure ALL your Status columns have the same list of Status values, then you would need to create a dedicated table of "Status Values" and then reference that Table in both/all of your Status  Enum columns.  I do this frequently.

The easiest thing, obviously, is to simply replicate the list of Status values in your other column.  Then you can control the order by moving the values to be listed in the order you wish them displayed. Of course this means when you need to update the list you need to do so in multiple places.

Top Labels in this Space