Sorting a dependent dropdown list via User Settings

I have two enum variables set in User Settings - first State and then City - which work perfectly in terms of displaying unique states and then related cities to the selected State - except that the displayed lists are not sorted. Iโ€™ve set the valid if for state (and done similarly for city) as TOOL4FORAPPSHEET[State] (where TOOL4FORAPPSHEET is the table). I canโ€™t seem to get any other function to work properly (e.g. orderby, filter or select). Guidance would be really appreciated. Thanks.

0 9 737
9 REPLIES 9

Did you try SORT expression? in validif constrain to reorder the list items as you want?

Thanks very much for your quick response. I actually did try SORT and received an input error. E.g.
I tried SORT(Tool4ForAppsheet[State][,Yes]) - with Yes both enclosed and not enclosed in quotes. Thanks again.

Pleasure to hear you solve the problems !

Try:

SORT(Tool4ForAppsheet[State], TRUE)

With TRUE, the list will be sorted in descending (Z-A) order. Use FALSE instead to sort in ascending (A-Z) order.

I have 2 dependent dropdowns. By ordering (with sort()) the first, the second is no longer filtering the options dependent on the first dropdown. How can I alphabetically order the first, without affecting the second?

Dependent dropdowns only work when both columns use table-column references only; if you add anything to the expression, dependent dropdown no longer applies. If dependent dropdown doesnโ€™t apply, youโ€™ll have to implement the logic yourself.

Sorry for my unclear response - the problem still exists for me and any guidance would be appreciated.

Itโ€™s so easy when you do it! Thanks Steve, that works perfectly. I was confused by the https://help.appsheet.com/en/articles/2357281-sort doc. I donโ€™t know if it needs an update, or the confusion is just with me.

The doc needs examples for sure!

Top Labels in this Space