Sort ENUM from same column

So I select ENUM in my column and it gives me a dropdown of all the previous selections made in the past for that column. How do I sort this? I know I can sort this if I reference a different column, but since this is the same column how do I convince this to sort in my dropdown?

Solved Solved
2 7 1,767
  • UX
1 ACCEPTED SOLUTION

You need to use one of the below expression in the Valid_If or Suggested Values expression of your ENUM column.

SORT(SELECT(TableName[ColumnName],TRUE,TRUE),TRUE) // Sorts the selected column values in descending order

SORT(SELECT(TableName[ColumnName],TRUE,TRUE),FALSE) // Sorts the selected column values in ascending order

View solution in original post

7 REPLIES 7

Yep, Iโ€™m familiar with the sort function, but Iโ€™m not calling a column to point the sort to. For example, I am in column A, and all I do is select ENUM, appsheet then just turns around and uses all of the previous responses as possible selections. Iโ€™m not entering a function in validif or suggestions, Iโ€™m just selecting enum. I know in other tables I can connect to a different column in a different table and contain it in sort(), but since Iโ€™m not pointing to another column, how do I sort?

You need to use one of the below expression in the Valid_If or Suggested Values expression of your ENUM column.

SORT(SELECT(TableName[ColumnName],TRUE,TRUE),TRUE) // Sorts the selected column values in descending order

SORT(SELECT(TableName[ColumnName],TRUE,TRUE),FALSE) // Sorts the selected column values in ascending order

Hello,

In my case, my Enum column has a REF type to a table,  so in your example, the sort is using key not the label. Do you have any idea to sort with the label. In other words, is it possible to sort a table using a column (label) for sorting, but another column (key) has output ?

I found the solution of my problem :  ORDERBY(TableName[key], [label])

Yep, Iโ€™ll do that. I was hoping there was some button that I hit that just sorts it for me instead of using a function. Thanks for the help

Youโ€™re welcome.

Top Labels in this Space