dropdown menu sorted by date

Hi everyone, I have a question:
I want to show the location names in a dropdown menu (ENUM) sorted by the date when they were added.  They are columns in the same table. [customers].[locationname] and [customers].[date]
I want to show the most recent location names when a new customer is added.
What does the SELECT expression look like then?
I can only select the unique id with ORDERBY() and not locationname. 

Or should I do something with VIRTUAL column.

Thanks in advance!

Solved Solved
0 4 161
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

 

Your request is both confusing and lacks details needed to offer a concrete suggestion.  But let's give it a shot!

Is customers the name of the table? If so, it should not be enclosed in square brackets. If not, what is the name of the table, and what does the customers column have to do with anything?

Assuming customers is the table name, add a virtual column named (e.g.) customers by date, with an App formula expression of:

ORDERBY(
  FILTER("customers", TRUE),
  [date],
    true,
  [_ROWNUMBER],
    true
)

For the column receiving the input location name, set the Suggested values expression to:

([customers by date][locationname] - LIST(""))

 

View solution in original post

4 REPLIES 4

Hello the easiest is to create a Slice sorted by date and attach it to the ENUMLIST.

Steve
Platinum 4
Platinum 4

 

Your request is both confusing and lacks details needed to offer a concrete suggestion.  But let's give it a shot!

Is customers the name of the table? If so, it should not be enclosed in square brackets. If not, what is the name of the table, and what does the customers column have to do with anything?

Assuming customers is the table name, add a virtual column named (e.g.) customers by date, with an App formula expression of:

ORDERBY(
  FILTER("customers", TRUE),
  [date],
    true,
  [_ROWNUMBER],
    true
)

For the column receiving the input location name, set the Suggested values expression to:

([customers by date][locationname] - LIST(""))

 

That's the solution, thanks for that!

You indicate that details are missing in my question, I find that difficult because if I do that in my native (dutch) language then I can tell you a lot more about it. 

I use Google Translate to translate posts in other languages to English. I find it works very well in most cases. Therefore, I suggest you post your questions in your native language, providing as much detail as you feel appropriate. We readers can then translate and work from there.

Top Labels in this Space