Sort ui_table by timestamp

Hello everybody!
I use a mysql database and display the data with the ui_table.
This all works great too.
Since the new mysql entries are added at the bottom, ui_table also displays the new values at the bottom.
I would now like to have the new values displayed at the top without having to sort them manually every time.
I would like to use the Timestamp column for this (2023-12-26T13:33:14.000Z)
Can someone help me with that?
thank you very much

Can you not make your mysql request return in the order you want ?

1 Like

Thank you!
I thought way too complicated.
Here is my finished function node, in case someone needs it.

msg.topic = "SELECT * FROM Table1 WHERE Column1 = '" + msg.payload.value1 + "' ORDER BY Timestamp DESC; "

return msg;
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.