Order valid if drop down when displayed column is not primary key

I need a drop down on column “Customer” in the Order table based on the column “Name” in the customer table.
The customer table has 4 columns: Name, FirstName, LastName and Email where Email is the key.
The drop down in the Order table must be the list “Name” from the customer table, sorted by LastName, then by FirstName. ORDERBY does not work, because Name is not the key of the customer table. How can I get the sorted drop down when the column I want to see is not the key?

Please see if this helps.

Is the Customer table referenced in the Order table?

If so, you may have a VC or real column in the Customer table called say FullName with an expression something like CONCATENATE( [LastName], " ", [First Name])

Edit: Please assign this FullName column as label

If you create it as a real column, you will need to open and resave existing customer table records for the new concatenated full name column to show up.

Now in the REF Column Customer column in Orders table you may have a valid_if expression like

ORDERBY(Customers[Email], [FullName]) where Customers is a table consisting of Customer data you mentioned.

2 Likes

This answers my question. Thank you!

2 Likes