Hello.
I present you my problem
I have a Ui_tablet node that works great.
But I am not able to sort the data from newest to oldest (in the image you can see that the "Timestamp" field is sorted from oldest to newest, just the opposite of how I want).
I give some data on how I fill the table and how I have configured it.
- Column configuration
- Add a row
msg.payload={
command:"addRow",
arguments: [
msg.payload,
false
],
returnPromise: true
}
return msg;
Where msg .payload is (by example)
var now = new Date();
var yyyy = now.getFullYear();
var mm = now.getMonth() < 9 ? "0" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based
var dd = now.getDate() < 10 ? "0" + now.getDate() : now.getDate();
var hh = now.getHours() < 10 ? "0" + now.getHours() : now.getHours();
var mmm = now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes();
var ss = now.getSeconds() < 10 ? "0" + now.getSeconds() : now.getSeconds();
msg.payload = {
//"timestamp" : + yyyy + "/"+ mm + "/" + dd + " " + hh + ":"+ mmm + ":" + ss ,
"timestamp" : + dd + "/"+ mm + "/" + yyyy + " " + hh + ":"+ mmm + ":" + ss ,
"Evento": "Orden HMI sobre DBT , APERTURA",
"status" : "#1FFDFE",
}
return msg;
Can you guide me on my doubt?