I have a Column Type Enum Base type Ref.
When I click the dropdown menu, I would like to see the newest one created to be at the top.
How and where would I put this expression?
Solved! Go to Solution.
You would need to have a way to get the newest one, generally speaking this is made by adding a column of datetime to your table so that every row will have a timestamp of when it was created using NOW() as it initial value.
Now, the way to get the newest one by default is by sorting by RowNumber.
Do this on Valif_If for your Enum
ORDERBY(
Table[ID],
[_RowNumber],
0=0
)
Hello @NCD, you can put this expression in your validif() column configuration, like this:
ORDERBY(Products[Product ID], [Product Price], TRUE)
This would sort the "Products" table based on their price in descending order, replace the table and sort column and see if it is descending (TRUE) or ascending (FALSE) order that suits you, I never manage to remember which is which !
Source: https://help.appsheet.com/en/articles/2357312-orderby
for solving that, place the same exact expression in suggestedvalues() instead.
You would need to have a way to get the newest one, generally speaking this is made by adding a column of datetime to your table so that every row will have a timestamp of when it was created using NOW() as it initial value.
Now, the way to get the newest one by default is by sorting by RowNumber.
Do this on Valif_If for your Enum
ORDERBY(
Table[ID],
[_RowNumber],
0=0
)
this worked, but now I'm unable to create new from the dropdown 😞
Hello @NCD, you can put this expression in your validif() column configuration, like this:
ORDERBY(Products[Product ID], [Product Price], TRUE)
This would sort the "Products" table based on their price in descending order, replace the table and sort column and see if it is descending (TRUE) or ascending (FALSE) order that suits you, I never manage to remember which is which !
Source: https://help.appsheet.com/en/articles/2357312-orderby
for solving that, place the same exact expression in suggestedvalues() instead.
Thank you very much!
Yep
User | Count |
---|---|
38 | |
32 | |
30 | |
17 | |
16 |