How to use 2 expressions togeather: SELECT and

To choose certain rows from another table to be available in a EnumList I am using SELECT in Data Validity, in Valid If.

SELECT(Knowledge Base[Description],[Available in HLC 7]="Yes",True)

I also want this same list to appear in alphabetic order in my EnumList.  How can this be done?  Can ORDERBY be used along with this expressions some way?

0 4 101
4 REPLIES 4

ORDERBY(SELECT(Knowledge Base[Description],[Available in HLC 7]="Yes",True),[SortColumnName],FALSE)

If your [Available in HLC 7] column is a Yes/No type then you can rewrite the formula as
ORDERBY(SELECT(Knowledge Base[Description],[Available in HLC 7],True),[SortColumnName],FALSE)

If you wanted the opposite of Yes you would use NOT([Available in HLC 7])

I think it reads better in IF statements and so on.

Steve
Platinum 5
Platinum 5

ORDERBY() is appropriate if the Description column of the Knowledge Base table is of type Ref. If not, use SORT() instead.

This is actually a common thing inside app sheet, you're trying to do two things at once (and app sheet has problems with that):

  • You're trying to pull a list of records 
  • Then you're trying to get specific values out of that list. 

Try splitting this into two distinct columns, one that has your list of records (which you can then wrap in order by to get them in the order that you want) and then in the other do a list dereference from the previous column to get the actual values you want.

The two columns are necessary because you can't order things using order by when you are using a non-id column; so you create the one column where it holds the references, with which you can then use order by, and then out of that create your derivative list of what you're really trying to get. (You'll often find that having that list of IDs is actually really helpful too )

Top Labels in this Space