Help with Sorting values in drop down list

I have a table: Type which has a key field Type_NO and a table field TYPE.

I use it in my Requests table as a REF field.

I cannot get it to sort in alphabetical order in the Requests form. I’m using an ENUMLIST field.

I have tried everything I can think of but can’t get it to work.

WHAT am I doing wrong? Thank you.

What does that mean?

Can’t get what to sort?

For what?

Enum and EnumList values are raw values, not expressions. You can’t use an expression here:

image

I suggest just removing that entry (with the trashcan button)–I don’t think you’ll need anything there. But do enable these:

image

Wrap this expression in SORT() to sort dropdown menu entries:

image

2 Likes

The Sort() on the valid If worked.

I removed the expression from the Values box. Not sure why I put that there at the beginning of working with AppSheet.

Question on Enabling Allow Other Values - I thought it let users add something that wasn’t in your list. I don’t want that.

from https://help.appsheet.com/en/articles/961539-dropdown-from-simple-list-of-values
If you enable the “AllowOtherValues” option, the users may enter any value they wish in addition to the allowed values displayed in the dropdown menu.

You can enable the “AutoCompleteOtherValues” option to make it easier for the user to choose from the set of previously entered values. This option can help ensure all entries are submitted in the same way, thereby avoiding typos.

Thanks Steve.

3 Likes

My experience with Allow other values has been that it’s required to be ON if there are no predefined values for the Enum column. But someone the other day said that wasn’t the case. Ideally, as you say, it would be OFF to prevent the user from entering their own value.

That said, Valid If can be used to prevent the user from choosing other values. But of Valid If offers Ref values and the table targeted by the Ref allows adds, the user can add new values. To avoid that, the Ref must target a table or slice that does not allow adds.

1 Like

That makes sense. That slice exists solely to make that Table’s data READ ONLY. It appears to work the same, in my case, whether Allow Other Values in On or Off.

Appreciate your help.

2 Likes