Hi, I try to make a table on my dashboard with the next nodes :
[
{
"id": "2f67ebdfe05368a8",
"type": "ui_table",
"z": "3e87841836f07711",
"group": "475b1ea5d099553a",
"name": "",
"order": 9,
"width": "12",
"height": "5",
"columns": [
{
"field": "Name",
"title": "Groepsnaam",
"width": "",
"align": "left",
"formatter": "plaintext",
"formatterParams": {
"target": "_blank"
}
},
{
"field": "Speeltijd",
"title": "Speeltijd",
"width": "",
"align": "left",
"formatter": "plaintext",
"formatterParams": {
"target": "_blank"
}
},
{
"field": "Straftijd",
"title": "Straftijd",
"width": "",
"align": "left",
"formatter": "plaintext",
"formatterParams": {
"target": "_blank"
}
}
],
"outputs": 0,
"cts": false,
"x": 790,
"y": 280,
"wires": []
},
{
"id": "7efafbb18d1f7f81",
"type": "function",
"z": "3e87841836f07711",
"name": "vul eindespel score",
"func": "var tabledata = global.get(\"savedata\") ||[];\n\nvar t = global.get(\"timeElapsed\") / 1000; //ms naar sec\nvar h = Math.floor(t / 3600);\nvar m = Math.floor(t % 3600 / 60);\nvar s = Math.floor(t % 3600 % 60);\nvar formattijd = (\"0\" + h).slice(-2) + \":\" + (\"0\" + m).slice(-2) + \":\" + (\"0\" + s).slice(-2);\n\ntabledata.unshift({\n \"Name\": \"pepe\",\n \"Speeltijd\": formattijd,\n \"Straftijd\": global.get(\"Straftijd\")\n });\n\nmsg.payload = tabledata;\n\nglobal.set(\"savedata\", tabledata);\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 300,
"wires": [
[
"2f67ebdfe05368a8"
]
]
},
{
"id": "84fce77886d70f14",
"type": "change",
"z": "3e87841836f07711",
"name": "",
"rules": [
{
"t": "set",
"p": "savedata",
"pt": "global",
"to": "[]",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 240,
"wires": [
[
"2f67ebdfe05368a8"
]
]
},
{
"id": "846d8fd7b5dd34e6",
"type": "inject",
"z": "3e87841836f07711",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 320,
"y": 300,
"wires": [
[
"7efafbb18d1f7f81"
]
]
},
{
"id": "baeef06c6f68d64e",
"type": "inject",
"z": "3e87841836f07711",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 320,
"y": 240,
"wires": [
[
"84fce77886d70f14"
]
]
},
{
"id": "475b1ea5d099553a",
"type": "ui_group",
"name": "Eindscore",
"tab": "6c20ebed9219bf3d",
"order": 1,
"disp": true,
"width": "12",
"collapse": false,
"className": ""
},
{
"id": "6c20ebed9219bf3d",
"type": "ui_tab",
"name": "Eindscore",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
If I push on one inject node, the table is cleared and I see that immediately in the table on screen.
If I push then on the other inject node, then the first line comes immediately in the table on screen.
If I push a second time to add an extra line, then nothing happens on screen.
If I refresh the browser, then I can see the second line.
Why is the screen not refreshed the second time?
What did I wrong?