AppSheet sort enumList

Hello,

I have a enumList column with data separated by ',' and try to sort data

I put SORT([_THIS]) in Suggested values bu nothing happen

Any idea?
Thanks and regards,

0 9 442
9 REPLIES 9

Are you trying to sort what shows up in the dropdown, or the actual values stored in the column?

I would like to sort in the dropdown list
I guess it's the data itself that I sort from this
Data > My Table > Edit column > in the Suggested values, I put sort(Places[Style])

Given what you have written, and as a guess to the answer of Marc's question, you appear to be trying to sort the list of dropdown values the enumlist produces. I don't think you can in this way. I am assuming you have a predefined list of values in the field in which case the order they are listed is the order they are shown. However if you are populating the values by means of a formula/expression then "[_THIS]" in your Sort expression is not correct - it would be some other source of values that you then sort. Something like SORT(table[column]).

I suspect it is the former though so you just need to manually sort the value in the column configuration. You can drag them up and down the list as you desire

I lost the enumList when I put sort(Lieux[Style]) in

Data > My Table > Edit column > Suggested values

[_THIS] refers to the value in the current column. So you definitely don't want to be using that.

If you're populating a dropdown via a List, either in Valid_If or Suggested Values, then you just need to wrap it in SORT().

Complications may arise if:

1. You're using both valid_if and suggestions values

2. You allow other values, and auto-complete other values.

Thank you for your answer

Maybe, it's because I use "allow other values" & "auto-complete other values"

When I put SORT(tableName[colName]), I lost the enumList split

Did anyone figured out how to sort a Enumlist and still give the user the ability to add values? 

If you are talking about sorting the values in the dropdown list of an ENUMLIST column, then what you should try is

Create a table to store ENUM values. (i.e. ENUM table). Here as an example I am assuming that all the values are unique and stored in the key column.

Configure the target ENUMLIST column as type=ENUMLIST, BASE =ref, table=ENUM table and in the suggested Values put SORT(ENUM table[key column containing ENUM values]). 

Here is a dropdown. you can add values via the New icon, which will be stored in the ENUM table.

TeeSee1_0-1698752354507.png

This is the raw data

TeeSee1_1-1698752432746.png

 

Thank you so much for your explanation TeeSee1. This was exactly what I was looking for!

Top Labels in this Space