Ui_table column width control

Hello,

I've tried to create a matrix using ui_table. Rows number and columns number vary upon a selection:
image
or
image

End goal: If PLC_time is present I want to have 1120 column fully visible and 1130 column width ~50px.

I've tried to use ui_control from examples and I can adjust column widths. Based on ui_control table example

[{"id":"ba92cba0.ee4ad8","type":"inject","z":"67fd869d22cb6dd2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"name\":\"MEQ0451495\",\"room\":\"Bathroom\",\"SET_TEMPERATURE-value\":22,\"ACTUAL_TEMPERATURE-value\":21.8,\"VALVE_STATE-value\":90,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":true,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875547\",\"room\":\"Living Room\",\"SET_TEMPERATURE-value\":12,\"ACTUAL_TEMPERATURE-value\":16.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":1},{\"name\":\"MEQ1875538\",\"room\":\"Living Room\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":19.5,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.6,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":2},{\"name\":\"MEQ0447462\",\"room\":\"Kitchen\",\"SET_TEMPERATURE-value\":17,\"ACTUAL_TEMPERATURE-value\":22.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":10,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":3},{\"name\":\"MEQ1875551\",\"room\":\"Office\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":20.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ0447425\",\"room\":\"Dining Room\",\"SET_TEMPERATURE-value\":19,\"ACTUAL_TEMPERATURE-value\":20.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875546\",\"room\":\"Dining Room\",\"SET_TEMPERATURE-value\":20,\"ACTUAL_TEMPERATURE-value\":18.8,\"VALVE_STATE-value\":99,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ0447483\",\"room\":\"Bedroom\",\"SET_TEMPERATURE-value\":17,\"ACTUAL_TEMPERATURE-value\":22.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875541\",\"room\":\"Child\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":20.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875552\",\"room\":\"Guest Room\",\"SET_TEMPERATURE-value\":20,\"ACTUAL_TEMPERATURE-value\":21.1,\"VALVE_STATE-value\":9,\"BATTERY_STATE-value\":2.8,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0}]","payloadType":"json","x":410,"y":1240,"wires":[["c15748e78a0971ec"]]},{"id":"5d38f5fa.6541bc","type":"debug","z":"67fd869d22cb6dd2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":850,"y":1240,"wires":[]},{"id":"4b960bb2.f61934","type":"ui_table","z":"67fd869d22cb6dd2","group":"51ce6aa1.620754","name":"Thermostats","order":1,"width":"20","height":"7","columns":[],"outputs":1,"cts":true,"x":710,"y":1240,"wires":[["5d38f5fa.6541bc"]]},{"id":"c15748e78a0971ec","type":"change","z":"67fd869d22cb6dd2","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"title\":\"ROom\",\"width\":300},{\"title\":\"Device\",\"width\":200},{\"title\":\"Type\",\"width\":200}],\"layout\":\"fitColumns\",\"movableColumns\":true},\"customHeight\":20}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":1240,"wires":[["4b960bb2.f61934"]]},{"id":"51ce6aa1.620754","type":"ui_group","name":"ui_control","tab":"3b08fac0.8f06b6","order":1,"disp":true,"width":"22","collapse":false},{"id":"3b08fac0.8f06b6","type":"ui_tab","name":"Home","icon":"track_changes","order":1,"disabled":false,"hidden":false}]

When I try to do something similar:

[{"id":"225ad40085b4ebc4","type":"inject","z":"67fd869d22cb6dd2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:                                                                                                                                                                                                       2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:                                                                                                                                                                                                      2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":1270,"y":1140,"wires":[["ba2f85e753c176b3"]]},{"id":"ba2f85e753c176b3","type":"change","z":"67fd869d22cb6dd2","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1620\",\"width\":400},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1630\",\"width\":200},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1650\",\"width\":200},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1702\",\"width\":100}],\"layout\":\"fitColumns\",\"movableColumns\":true},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":1140,"wires":[["1e9883bceefb0c93"]]},{"id":"e1a43210a360a44f","type":"inject","z":"67fd869d22cb6dd2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:                                                                                                                                                                                                       2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:                                                                                                                                                                                                      2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":1270,"y":1080,"wires":[["1e9883bceefb0c93"]]},{"id":"1e9883bceefb0c93","type":"ui_table","z":"67fd869d22cb6dd2","group":"e6a2635c3122789a","name":"","width":"27","height":"14","columns":[],"outputs":0,"cts":false,"x":1550,"y":1080,"wires":[]},{"id":"e6a2635c3122789a","type":"ui_group","name":"Table","tab":"a5df8d5a2144a056","order":3,"disp":true,"width":"30","collapse":false,"className":""},{"id":"a5df8d5a2144a056","type":"ui_tab","name":"Data2","icon":"track_changes","order":8,"disabled":false,"hidden":false}]

It formats table without a data:

What am I missing?

In the second flow, the inject node has a bad msg.payload.


That might be your issue...

It is the same input as in first inject: I have cleared empty spaces:

[{"id":"225ad40085b4ebc4","type":"inject","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":1290,"y":1140,"wires":[["ba2f85e753c176b3"]]},{"id":"ba2f85e753c176b3","type":"change","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1620\",\"width\":400},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1630\",\"width\":200},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1650\",\"width\":200},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1702\",\"width\":100}],\"layout\":\"fitColumns\",\"movableColumns\":true},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1420,"y":1140,"wires":[["e7b0386e940aa0b4"]]},{"id":"e1a43210a360a44f","type":"inject","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":1290,"y":1080,"wires":[["e7b0386e940aa0b4"]]},{"id":"eb8575af755250fe","type":"ui_table","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","group":"e6a2635c3122789a","name":"","width":"27","height":"14","columns":[],"outputs":0,"cts":false,"x":1630,"y":1080,"wires":[]},{"id":"e7b0386e940aa0b4","type":"junction","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","x":1520,"y":1080,"wires":[["eb8575af755250fe"]]},{"id":"e6a2635c3122789a","type":"ui_group","name":"Table","tab":"a5df8d5a2144a056","order":3,"disp":true,"width":"30","collapse":false,"className":""},{"id":"a5df8d5a2144a056","type":"ui_tab","name":"Data2","icon":"track_changes","order":7,"disabled":false,"hidden":false}]

Both inject nodes are the same:
image
image

After injecting through ui_control I receive
image
so I would argue that something is bad there

Your first flow doesn't show any data in the table for me.

You are completely right.
Initially I injected data that was in example, then I cleaned ui_control from example as much as possible. After each inject it was modifying columns width so I thought it was working.

After I modified inject node, I get the same result. So it is good that I have same behavior in 2 separate cases. Back to the original example to find where I messed up :slight_smile:

1 Like

One step forward, but got stuck again:
Inject1:


Inject2 - adjust columns length (something good)
image
Inject3 - added new columns, I expected to delete unused ones 1620 1630 1650

How do I prepare table to clean state, so after each inject I would draw new table instead of adjust previous one?
image

[{"id":"225ad40085b4ebc4","type":"inject","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":1290,"y":1140,"wires":[["ba2f85e753c176b3"]]},{"id":"ba2f85e753c176b3","type":"change","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1620\",\"field\":\"1620\",\"width\":300,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1630\",\"field\":\"1630\",\"width\":200,\"align\":\"left\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1650\",\"field\":\"1650\",\"width\":100,\"align\":\"center\"}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1420,"y":1140,"wires":[["e7b0386e940aa0b4"]]},{"id":"e1a43210a360a44f","type":"inject","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":1290,"y":1080,"wires":[["e7b0386e940aa0b4"]]},{"id":"618ff2fd4fa13f8c","type":"inject","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1402\":\"PLC_time:\",\"1520\":\"PLC_time:2023-01-19 09:58:16.721\",\"1530\":\"PLC_time:\",\"1550\":\"PLC_time:2023-01-19 09:58:16.721\"},{\"1402\":\"TPOS:\",\"1520\":\"TPOS: 0\",\"1530\":\"TPOS:\",\"1550\":\"TPOS: 0\"},{\"1402\":\"ASEA:\",\"1520\":\"ASEA: 0\",\"1530\":\"ASEA:\",\"1550\":\"ASEA: 0\"},{\"1402\":\"FILC:\",\"1520\":\"FILC: 0\",\"1530\":\"FILC:\",\"1550\":\"FILC: 0\"}]","payloadType":"json","x":1290,"y":1180,"wires":[["31cd02dfe621ca05"]]},{"id":"31cd02dfe621ca05","type":"change","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1520\",\"field\":\"1520\",\"width\":300,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1530\",\"field\":\"1530\",\"width\":200,\"align\":\"left\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1550\",\"field\":\"1550\",\"width\":100,\"align\":\"center\"}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1420,"y":1180,"wires":[["e7b0386e940aa0b4"]]},{"id":"75909c70aecfab25","type":"ui_table","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","group":"e6a2635c3122789a","name":"","width":"27","height":"14","columns":[],"outputs":0,"cts":false,"x":1590,"y":1080,"wires":[]},{"id":"e7b0386e940aa0b4","type":"junction","z":"67fd869d22cb6dd2","g":"8e478126b27e458d","x":1520,"y":1080,"wires":[["75909c70aecfab25"]]},{"id":"e6a2635c3122789a","type":"ui_group","name":"Table","tab":"a5df8d5a2144a056","order":3,"disp":true,"width":"30","collapse":false,"className":""},{"id":"a5df8d5a2144a056","type":"ui_tab","name":"Data2","icon":"track_changes","order":7,"disabled":false,"hidden":false}]

is there a simplier way to control column width via msg without using msg.ui_control?

1 Like

I'm not an expert with tabulator by any means so I would suggest you take a look at
Documentation | Tabulator and see what you can find out.

Thanks for info,

I have a concern in general with tabulator that it permanently affects table state. Everything would be fine if I wouldn't have changing column names.

ui_control
Is it normal table node behavior or should I raise an issue? because I'm a bit lost

Work around would be to restart table node (get it to initial state) without restarting all flows. Is it possible? This would be ugly solution. but right now the only way I see it.

I played with this a bit but hit some oddities and don't have any solution for you but here is what I was doing if you want to play and see if you can get it to work.

[{"id":"503195fc4e881157","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"83d2127cc7bbd4d5","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#ffbfbf","label":true},"nodes":["98728a0a97c06b44","c4a3c3686fe0da0a"],"x":854,"y":-1,"w":232,"h":122},{"id":"f99591bb0d9041c4","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#bfdbef","label":true},"nodes":["618ff2fd4fa13f8c","31cd02dfe621ca05","c03fc203ad9b2ecc","9f8e3ec7b7ccfaaf","9eba943d0d7cd3cc","fefc8d5ba3cab722","d82f0b81527433fd"],"x":34,"y":739,"w":872,"h":162},{"id":"d2c081c7523f0cec","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#bfdbef","label":true},"nodes":["225ad40085b4ebc4","ba2f85e753c176b3","126ba147e39a1114","e1d6844d8443d75a","1b6e7702741cb381","76e218bb5902a2f4","c75f9e96cab93b8b"],"x":34,"y":559,"w":872,"h":162},{"id":"cc0bd0027aef4470","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#bfdbef","label":true},"nodes":["e1a43210a360a44f","18af4760d8083420","3223ca7889f06965","961138369f5ad967","380c920f908dc4d9","017c6631905d57f0"],"x":34,"y":399,"w":872,"h":142},{"id":"618027fd826bdca5","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#ffefbf","label":true},"nodes":["3142c17cb6ac3047","4e7f85575c2b8dae","6fe322a2c20d54fb","c2efbdc8747ef9bf","57fe8a5b38b8a733","03882f5b89468ab1","7a2d8415213e174e"],"x":34,"y":219,"w":872,"h":162},{"id":"73c8f327a4e0e322","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#ffffbf","label":true},"nodes":["75909c70aecfab25","e1746516c18c5363"],"x":454,"y":119,"w":272,"h":82},{"id":"225ad40085b4ebc4","type":"inject","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"1620, 1630, 1650, 1702","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":180,"y":620,"wires":[["126ba147e39a1114","1b6e7702741cb381"]]},{"id":"ba2f85e753c176b3","type":"change","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1620\",\"field\":\"1620\",\"width\":300,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1630\",\"field\":\"1630\",\"width\":200,\"align\":\"left\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1650\",\"field\":\"1650\",\"width\":100,\"align\":\"center\"}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":640,"wires":[["e1d6844d8443d75a","c75f9e96cab93b8b"]]},{"id":"e1a43210a360a44f","type":"inject","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"1620, 1630, 1650, 1702","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":180,"y":460,"wires":[["18af4760d8083420","3223ca7889f06965"]]},{"id":"618ff2fd4fa13f8c","type":"inject","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"1402, 1520, 1530, 1550 ","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[     {         \"1520\": \"TPOS: 0\",         \"1402\": \"TPOS: 3\",         \"1530\": \"TPOS:\",         \"1550\": \"TPOS: 0\"     },     {         \"1520\": \"ASEA: 0\",         \"1402\": \"ASEA: 5\",         \"1530\": \"ASEA:\",         \"1550\": \"ASEA: 0\"     },     {         \"1520\": \"PLC_time:2023-01-19 09:58:16.721\",         \"1402\": \"PLC_time: 2\",         \"1530\": \"PLC_time:\",         \"1550\": \"PLC_time:2023-01-19 09:58:16.721\"     },     {         \"1520\": \"FILC: 0\",         \"1402\": \"FILC: 6\",         \"1530\": \"FILC:\",         \"1550\": \"FILC: 0\"     } ]","payloadType":"json","x":180,"y":800,"wires":[["c03fc203ad9b2ecc","9eba943d0d7cd3cc"]]},{"id":"31cd02dfe621ca05","type":"change","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1520\",\"field\":\"1520\",\"width\":300,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1530\",\"field\":\"1530\",\"width\":200,\"align\":\"left\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1550\",\"field\":\"1550\",\"width\":100,\"align\":\"center\"}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":820,"wires":[["9f8e3ec7b7ccfaaf","d82f0b81527433fd"]]},{"id":"75909c70aecfab25","type":"ui_table","z":"503195fc4e881157","g":"73c8f327a4e0e322","group":"e6a2635c3122789a","name":"","width":"27","height":"14","columns":[],"outputs":0,"cts":false,"x":650,"y":160,"wires":[]},{"id":"18af4760d8083420","type":"debug","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":200,"y":500,"wires":[]},{"id":"126ba147e39a1114","type":"debug","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":220,"y":660,"wires":[]},{"id":"c03fc203ad9b2ecc","type":"debug","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":220,"y":840,"wires":[]},{"id":"e1d6844d8443d75a","type":"debug","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":680,"wires":[]},{"id":"9f8e3ec7b7ccfaaf","type":"debug","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"debug 5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":860,"wires":[]},{"id":"1b6e7702741cb381","type":"trigger","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"","op1":"[{\"\":\"\"}]","op2":"","op1type":"json","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":420,"y":620,"wires":[["76e218bb5902a2f4"],["ba2f85e753c176b3"]]},{"id":"9eba943d0d7cd3cc","type":"trigger","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"","op1":"[{\"\":\"\"}]","op2":"","op1type":"json","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":420,"y":800,"wires":[["fefc8d5ba3cab722"],["31cd02dfe621ca05"]]},{"id":"d3e4167576a65984","type":"change","z":"503195fc4e881157","name":"move to flow.columns","rules":[{"t":"set","p":"columns","pt":"flow","to":"columns","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":160,"y":140,"wires":[[]]},{"id":"3142c17cb6ac3047","type":"inject","z":"503195fc4e881157","g":"618027fd826bdca5","name":"Clear table","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"columns","payloadType":"flow","x":140,"y":260,"wires":[["57fe8a5b38b8a733"]]},{"id":"4e7f85575c2b8dae","type":"split","z":"503195fc4e881157","g":"618027fd826bdca5","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":510,"y":300,"wires":[["c2efbdc8747ef9bf"]]},{"id":"6fe322a2c20d54fb","type":"debug","z":"503195fc4e881157","g":"618027fd826bdca5","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":340,"wires":[]},{"id":"98728a0a97c06b44","type":"catch","z":"503195fc4e881157","g":"83d2127cc7bbd4d5","name":"","scope":null,"uncaught":false,"x":940,"y":40,"wires":[["c4a3c3686fe0da0a"]]},{"id":"c4a3c3686fe0da0a","type":"debug","z":"503195fc4e881157","g":"83d2127cc7bbd4d5","name":"debug catch","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":80,"wires":[]},{"id":"c2efbdc8747ef9bf","type":"template","z":"503195fc4e881157","g":"618027fd826bdca5","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n    \"command\": \"deleteColumn\",\n    \"arguments\": [\n        \n            {{payload\n            }}\n        ,\n        true\n    ]\n}","output":"json","x":660,"y":300,"wires":[["6fe322a2c20d54fb","7a2d8415213e174e"]]},{"id":"57fe8a5b38b8a733","type":"change","z":"503195fc4e881157","g":"618027fd826bdca5","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"columns","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":300,"wires":[["4e7f85575c2b8dae"]]},{"id":"5b1c841d57e69dc7","type":"inject","z":"503195fc4e881157","name":"delete col 1630","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1630,true],\"returnPromise\":true}","payloadType":"json","x":520,"y":40,"wires":[["fae80d2a6a6ab7aa","823737a8d0c128d6"]]},{"id":"fae80d2a6a6ab7aa","type":"debug","z":"503195fc4e881157","name":"debug 8","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":500,"y":80,"wires":[]},{"id":"c343daa6d2212451","type":"inject","z":"503195fc4e881157","name":"enter columns names (all)","props":[{"p":"columns","v":"[1402, 1520,1530,1550,1620,1630,1650,1702]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":80,"wires":[["d3e4167576a65984"]]},{"id":"3223ca7889f06965","type":"trigger","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"","op1":"[{\"\":\"\"}]","op2":"","op1type":"json","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":420,"y":460,"wires":[["380c920f908dc4d9"],["961138369f5ad967","017c6631905d57f0"]]},{"id":"961138369f5ad967","type":"debug","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"debug 9","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":440,"y":500,"wires":[]},{"id":"8ca90733891f016e","type":"inject","z":"503195fc4e881157","name":"enter columns names 1620,1630,1650","props":[{"p":"columns","v":"[1620,1630,1650]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":40,"wires":[["d3e4167576a65984"]]},{"id":"fefc8d5ba3cab722","type":"link out","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"To CLEAR TABLE","mode":"link","links":[],"x":650,"y":780,"wires":[],"l":true},{"id":"03882f5b89468ab1","type":"link in","z":"503195fc4e881157","g":"618027fd826bdca5","name":"CLEAR TABLE","links":[],"x":140,"y":300,"wires":[["57fe8a5b38b8a733"]],"l":true},{"id":"380c920f908dc4d9","type":"link out","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"To CLEAR TABLE","mode":"link","links":[],"x":630,"y":440,"wires":[],"l":true},{"id":"76e218bb5902a2f4","type":"link out","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"To CLEAR TABLE","mode":"link","links":[],"x":650,"y":600,"wires":[],"l":true},{"id":"d82f0b81527433fd","type":"link out","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":820,"wires":[],"l":true},{"id":"c75f9e96cab93b8b","type":"link out","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":640,"wires":[],"l":true},{"id":"017c6631905d57f0","type":"link out","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":480,"wires":[],"l":true},{"id":"7a2d8415213e174e","type":"link out","z":"503195fc4e881157","g":"618027fd826bdca5","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":300,"wires":[],"l":true},{"id":"823737a8d0c128d6","type":"link out","z":"503195fc4e881157","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":680,"y":40,"wires":[],"l":true},{"id":"e1746516c18c5363","type":"link in","z":"503195fc4e881157","g":"73c8f327a4e0e322","name":"TABLE","links":["017c6631905d57f0","7a2d8415213e174e","823737a8d0c128d6","c75f9e96cab93b8b","d82f0b81527433fd"],"x":530,"y":160,"wires":[["75909c70aecfab25"]],"l":true},{"id":"e6a2635c3122789a","type":"ui_group","name":"Table","tab":"a5df8d5a2144a056","order":3,"disp":true,"width":"30","collapse":false,"className":""},{"id":"a5df8d5a2144a056","type":"ui_tab","name":"Data2","icon":"track_changes","order":2,"disabled":false,"hidden":false}]

one of th oddities is that the column 1402 never shows up???

Thanks, I was playing around and I can see possibilities with workaround: generate new table and delete unnecessary columns. Which can be easily automated. The problem is that I cannot understand why I get this empty column in the middle which doesn't make any sense.

I removed 1402 and 1702, because I thought that they are causing this issue, but it always generates a gap


[{"id":"d3e4167576a65984","type":"change","z":"503195fc4e881157","name":"move to flow.columns","rules":[{"t":"set","p":"columns","pt":"flow","to":"columns","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":160,"y":140,"wires":[[]]},{"id":"5b1c841d57e69dc7","type":"inject","z":"503195fc4e881157","name":"delete col 1630","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1630,true],\"returnPromise\":true}","payloadType":"json","x":520,"y":40,"wires":[["fae80d2a6a6ab7aa","823737a8d0c128d6"]]},{"id":"fae80d2a6a6ab7aa","type":"debug","z":"503195fc4e881157","name":"debug 8","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":180,"wires":[]},{"id":"c343daa6d2212451","type":"inject","z":"503195fc4e881157","name":"enter columns names (all)","props":[{"p":"columns","v":"[1520,1530,1550,1620,1630,1650]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":80,"wires":[["d3e4167576a65984"]]},{"id":"8ca90733891f016e","type":"inject","z":"503195fc4e881157","name":"enter columns names 1620,1630,1650","props":[{"p":"columns","v":"[1620,1630,1650]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":40,"wires":[["d3e4167576a65984"]]},{"id":"823737a8d0c128d6","type":"link out","z":"503195fc4e881157","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":680,"y":40,"wires":[],"l":true},{"id":"bc89d1a98973ed03","type":"inject","z":"503195fc4e881157","name":"delete col 1520","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1520,true],\"returnPromise\":true}","payloadType":"json","x":520,"y":120,"wires":[["823737a8d0c128d6"]]},{"id":"dcaaaccd2fcdd399","type":"inject","z":"503195fc4e881157","name":"delete col 1530","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1530,true],\"returnPromise\":true}","payloadType":"json","x":520,"y":160,"wires":[["823737a8d0c128d6"]]},{"id":"d105deb011338c4d","type":"inject","z":"503195fc4e881157","name":"delete col 1550","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1550,true],\"returnPromise\":true}","payloadType":"json","x":520,"y":200,"wires":[["823737a8d0c128d6"]]},{"id":"519d31b2be896b6d","type":"inject","z":"503195fc4e881157","name":"delete col 1620","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1620,true],\"returnPromise\":true}","payloadType":"json","x":520,"y":80,"wires":[["823737a8d0c128d6"]]},{"id":"8516f10283720ace","type":"inject","z":"503195fc4e881157","name":"delete col 1650","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[1650,true],\"returnPromise\":true}","payloadType":"json","x":320,"y":200,"wires":[["823737a8d0c128d6"]]},{"id":"83d2127cc7bbd4d5","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#ffbfbf","label":true},"nodes":["98728a0a97c06b44","c4a3c3686fe0da0a"],"x":854,"y":-1,"w":232,"h":122},{"id":"98728a0a97c06b44","type":"catch","z":"503195fc4e881157","g":"83d2127cc7bbd4d5","name":"","scope":null,"uncaught":false,"x":940,"y":40,"wires":[["c4a3c3686fe0da0a"]]},{"id":"c4a3c3686fe0da0a","type":"debug","z":"503195fc4e881157","g":"83d2127cc7bbd4d5","name":"debug catch","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":80,"wires":[]},{"id":"f99591bb0d9041c4","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#bfdbef","label":true},"nodes":["618ff2fd4fa13f8c","31cd02dfe621ca05","c03fc203ad9b2ecc","9f8e3ec7b7ccfaaf","9eba943d0d7cd3cc","fefc8d5ba3cab722","d82f0b81527433fd"],"x":34,"y":739,"w":872,"h":162},{"id":"618ff2fd4fa13f8c","type":"inject","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"1520, 1530, 1550 ","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1520\":\"TPOS: 0\",\"1530\":\"TPOS:\",\"1550\":\"TPOS: 0\"},{\"1520\":\"ASEA: 0\",\"1530\":\"ASEA:\",\"1550\":\"ASEA: 0\"},{\"1520\":\"PLC_time:2023-01-19 09:58:16.721\",\"1530\":\"PLC_time:\",\"1550\":\"PLC_time:2023-01-19 09:58:16.721\"},{\"1520\":\"FILC: 0\",\"1530\":\"FILC:\",\"1550\":\"FILC: 0\"}]","payloadType":"json","x":160,"y":800,"wires":[["c03fc203ad9b2ecc","9eba943d0d7cd3cc"]]},{"id":"31cd02dfe621ca05","type":"change","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1520\",\"field\":\"1520\",\"width\":300,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1530\",\"field\":\"1530\",\"width\":200,\"align\":\"left\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1550\",\"field\":\"1550\",\"width\":100,\"align\":\"center\"}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":820,"wires":[["9f8e3ec7b7ccfaaf","d82f0b81527433fd"]]},{"id":"c03fc203ad9b2ecc","type":"debug","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":220,"y":840,"wires":[]},{"id":"9f8e3ec7b7ccfaaf","type":"debug","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"debug 5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":860,"wires":[]},{"id":"9eba943d0d7cd3cc","type":"trigger","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"","op1":"[{\"\":\"\"}]","op2":"","op1type":"json","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":420,"y":800,"wires":[["fefc8d5ba3cab722"],["31cd02dfe621ca05"]]},{"id":"fefc8d5ba3cab722","type":"link out","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"To CLEAR TABLE","mode":"link","links":[],"x":650,"y":780,"wires":[],"l":true},{"id":"d82f0b81527433fd","type":"link out","z":"503195fc4e881157","g":"f99591bb0d9041c4","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":820,"wires":[],"l":true},{"id":"d2c081c7523f0cec","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#bfdbef","label":true},"nodes":["225ad40085b4ebc4","ba2f85e753c176b3","126ba147e39a1114","e1d6844d8443d75a","1b6e7702741cb381","76e218bb5902a2f4","c75f9e96cab93b8b"],"x":34,"y":559,"w":872,"h":162},{"id":"225ad40085b4ebc4","type":"inject","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"1620, 1630, 1650","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\"}]","payloadType":"json","x":160,"y":620,"wires":[["126ba147e39a1114","1b6e7702741cb381"]]},{"id":"ba2f85e753c176b3","type":"change","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1620\",\"field\":\"1620\",\"width\":300,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1630\",\"field\":\"1630\",\"width\":200,\"align\":\"left\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"1650\",\"field\":\"1650\",\"width\":100,\"align\":\"center\"}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":640,"wires":[["e1d6844d8443d75a","c75f9e96cab93b8b"]]},{"id":"126ba147e39a1114","type":"debug","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":220,"y":660,"wires":[]},{"id":"e1d6844d8443d75a","type":"debug","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":680,"wires":[]},{"id":"1b6e7702741cb381","type":"trigger","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"","op1":"[{\"\":\"\"}]","op2":"","op1type":"json","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":420,"y":620,"wires":[["76e218bb5902a2f4"],["ba2f85e753c176b3"]]},{"id":"76e218bb5902a2f4","type":"link out","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"To CLEAR TABLE","mode":"link","links":[],"x":650,"y":600,"wires":[],"l":true},{"id":"c75f9e96cab93b8b","type":"link out","z":"503195fc4e881157","g":"d2c081c7523f0cec","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":640,"wires":[],"l":true},{"id":"cc0bd0027aef4470","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#bfdbef","label":true},"nodes":["e1a43210a360a44f","18af4760d8083420","3223ca7889f06965","961138369f5ad967","380c920f908dc4d9","017c6631905d57f0"],"x":34,"y":399,"w":872,"h":142},{"id":"e1a43210a360a44f","type":"inject","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"1620, 1630, 1650","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\"}]","payloadType":"json","x":160,"y":460,"wires":[["18af4760d8083420","3223ca7889f06965"]]},{"id":"18af4760d8083420","type":"debug","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":200,"y":500,"wires":[]},{"id":"3223ca7889f06965","type":"trigger","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"","op1":"[{\"\":\"\"}]","op2":"","op1type":"json","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":420,"y":460,"wires":[["380c920f908dc4d9"],["961138369f5ad967","017c6631905d57f0"]]},{"id":"961138369f5ad967","type":"debug","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"debug 9","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":440,"y":500,"wires":[]},{"id":"380c920f908dc4d9","type":"link out","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"To CLEAR TABLE","mode":"link","links":["03882f5b89468ab1"],"x":630,"y":440,"wires":[],"l":true},{"id":"017c6631905d57f0","type":"link out","z":"503195fc4e881157","g":"cc0bd0027aef4470","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":480,"wires":[],"l":true},{"id":"618027fd826bdca5","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#ffefbf","label":true},"nodes":["3142c17cb6ac3047","4e7f85575c2b8dae","6fe322a2c20d54fb","c2efbdc8747ef9bf","57fe8a5b38b8a733","03882f5b89468ab1","7a2d8415213e174e"],"x":34,"y":219,"w":872,"h":162},{"id":"3142c17cb6ac3047","type":"inject","z":"503195fc4e881157","g":"618027fd826bdca5","name":"Clear table","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"columns","payloadType":"flow","x":140,"y":260,"wires":[["57fe8a5b38b8a733"]]},{"id":"4e7f85575c2b8dae","type":"split","z":"503195fc4e881157","g":"618027fd826bdca5","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":510,"y":300,"wires":[["c2efbdc8747ef9bf"]]},{"id":"6fe322a2c20d54fb","type":"debug","z":"503195fc4e881157","g":"618027fd826bdca5","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":340,"wires":[]},{"id":"c2efbdc8747ef9bf","type":"template","z":"503195fc4e881157","g":"618027fd826bdca5","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n    \"command\": \"deleteColumn\",\n    \"arguments\": [\n        \n            {{payload\n            }}\n        ,\n        true\n    ]\n}","output":"json","x":660,"y":300,"wires":[["6fe322a2c20d54fb","7a2d8415213e174e"]]},{"id":"57fe8a5b38b8a733","type":"change","z":"503195fc4e881157","g":"618027fd826bdca5","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"columns","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":300,"wires":[["4e7f85575c2b8dae"]]},{"id":"03882f5b89468ab1","type":"link in","z":"503195fc4e881157","g":"618027fd826bdca5","name":"CLEAR TABLE","links":["380c920f908dc4d9"],"x":140,"y":300,"wires":[["57fe8a5b38b8a733"]],"l":true},{"id":"7a2d8415213e174e","type":"link out","z":"503195fc4e881157","g":"618027fd826bdca5","name":"To TABLE","mode":"link","links":["e1746516c18c5363"],"x":820,"y":300,"wires":[],"l":true},{"id":"73c8f327a4e0e322","type":"group","z":"503195fc4e881157","name":"","style":{"fill":"#ffffbf","label":true},"nodes":["e1746516c18c5363","8e88f86679d3991b"],"x":954,"y":139,"w":292,"h":82},{"id":"e1746516c18c5363","type":"link in","z":"503195fc4e881157","g":"73c8f327a4e0e322","name":"TABLE","links":["017c6631905d57f0","7a2d8415213e174e","823737a8d0c128d6","c75f9e96cab93b8b","d82f0b81527433fd"],"x":1030,"y":180,"wires":[["8e88f86679d3991b"]],"l":true},{"id":"8e88f86679d3991b","type":"ui_table","z":"503195fc4e881157","g":"73c8f327a4e0e322","group":"e6a2635c3122789a","name":"","width":"27","height":"14","columns":[],"outputs":0,"cts":false,"x":1170,"y":180,"wires":[]},{"id":"e6a2635c3122789a","type":"ui_group","name":"Table","tab":"a5df8d5a2144a056","order":3,"disp":true,"width":"30","collapse":false,"className":""},{"id":"a5df8d5a2144a056","type":"ui_tab","name":"Data2","icon":"track_changes","order":2,"disabled":false,"hidden":false}]

Yea that missing column is a puzzle to me too

I may be missing the point here, but do you have to define the column names in the ui_control/tabulator object? The number of columns and the column names will change, you say. Couldn't you just let ui_table use the row object properties as column names, and specify that the column width should fit the data? This can be done by setting ui_control to {"tabulator": {"layout": "fitData"}}. Alternative layouts are fitDataFill, fitDataStretch and fitColumns.

[{"id":"57f4f07a766d8864","type":"inject","z":"44b413355573db5e","name":"1620, 1630, 1650, 1702","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1620\":\"PLC_time:2023-01-19 09:58:16.721\",\"1630\":\"PLC_time:\",\"1650\":\"PLC_time:2023-01-19 09:58:16.721\",\"1702\":\"PLC_time:\"},{\"1620\":\"TPOS: 0\",\"1630\":\"TPOS:\",\"1650\":\"TPOS: 0\",\"1702\":\"TPOS:\"},{\"1620\":\"ASEA: 0\",\"1630\":\"ASEA:\",\"1650\":\"ASEA: 0\",\"1702\":\"ASEA:\"},{\"1620\":\"FILC: 0\",\"1630\":\"FILC:\",\"1650\":\"FILC: 0\",\"1702\":\"FILC:\"}]","payloadType":"json","x":280,"y":340,"wires":[["fbb69812210d45f6"]]},{"id":"d4a90f5ce3ada438","type":"inject","z":"44b413355573db5e","name":"1120, 1130","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"1120\":\"PLC_time:2023-01-19 09:59:35.728\",\"1130\":\"PLC_time:\"},{\"1120\":\"ORDE:\",\"1130\":\"ORDE:\"},{\"1120\":\"FIST: 0\",\"1130\":\"FIST:\"},{\"1120\":\"ASEN: 0\",\"1130\":\"ASEN:\"},{\"1120\":\"RELE: 0\",\"1130\":\"RELE:\"},{\"1120\":\"ASEA: 0\",\"1130\":\"ASEA:\"}]","payloadType":"json","x":240,"y":420,"wires":[["fbb69812210d45f6"]]},{"id":"6a921f511e28a358","type":"ui_table","z":"44b413355573db5e","group":"50e50a879458a7e6","name":"","order":0,"width":"27","height":"14","columns":[],"outputs":0,"cts":false,"x":650,"y":380,"wires":[]},{"id":"fbb69812210d45f6","type":"change","z":"44b413355573db5e","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"layout\":\"fitData\"}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":380,"wires":[["6a921f511e28a358"]]},{"id":"50e50a879458a7e6","type":"ui_group","name":"TableTest","tab":"0d9a8e8bae5c6a8d","order":1,"disp":true,"width":"27","collapse":false,"className":""},{"id":"0d9a8e8bae5c6a8d","type":"ui_tab","name":"TestTab","icon":"dashboard","disabled":false,"hidden":false}]
2 Likes

Thank you @jarragakk from me too ...

PS:
I’ve been looking for months how to adjust columns width based on the length of the data.
I asked in this forum and in other but it seemed the hardest thing of the world and only enough setting ui_control to {"tabulator": {"layout": "fitData"}} ? :sweat_smile:

Thanks for an idea.

It still is if you want to set it up for fixed value :smiley:

You're welcome! :smiley:

In your first post, you write: "If PLC_time is present I want to have 1120 column fully visible and 1130 column width ~50px". However, in your last example, the screenshot shows that the "1550" column isn't fully visible, even if PLC_time is present. Was this just for testing purposes, or is the rule for choosing the column width more complicated than I first anticipated? It would be nice if the column settings could be created by a function node while processing the input table. :slightly_smiling_face:

Testing purposes. I just wanted to have any control upon columns width

Yes, indeed

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