Hi Guys,
I have an app where by multiple products have a traceability code. I would like the suggested values to list the 10 most recent traceability codes of the table Produce Intake 2023 for that product (In this case Baby Spinach). I have a date column in the form also if this can help with an expression.
This is the formula i have currently, my only issue is it is listing based on alphabetical/numerical, and not by the desired date (Newest to oldest).
TOP(
SORT(
SELECT(Produce Intake 2023[Baby Spinach Traceability Code], TRUE),
TRUE
),
10
)
As always, any help greatly appreciated!
Thanks,
J
Solved! Go to Solution.
It depends what do you need to do with the saved value. If the Timestamp is fine, you could select the code column as a label and use Enum column with the base type of Ref. The app will then show your code value, but the Timestamp will be saved to your data source.
If you are able to use that table's key column value, you can sort the list with a specific column. The expression is then ORDERBY(). The SORT() will only work with the selected column in the formula.. in this case [Baby Spinach Traceability Code]
Hi AleksiAlkio,
Thank you for your response. My key column is a Timestamp column and unfortunately when using ORDERBY() just gives me a list of time stamps and not the traceability codes I am looking for. Do you know is there another way or could I be missing something?
It depends what do you need to do with the saved value. If the Timestamp is fine, you could select the code column as a label and use Enum column with the base type of Ref. The app will then show your code value, but the Timestamp will be saved to your data source.
Thank you Aleksi!!!
User | Count |
---|---|
15 | |
11 | |
9 | |
7 | |
4 |