# Unable to hide column in node-red-node-ui-table

**URL:** <https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661>\
**Category:** Dashboard\
**Created:** [27 October 2022 08:19 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661 "2022-10-27T08:19:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fjorge](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@fjorge](https://discourse.nodered.org/u/fjorge)\
**Post date:** [27 October 2022 08:19 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/1 "2022-10-27T08:19:16Z")

</div>

Hello,

I have the following flow:

```auto
[
    {
        "id": "ef64e5df.b58d9",
        "type": "tab",
        "label": "Flow 3",
        "disabled": false,
        "info": ""
    },
    {
        "id": "2ada6432.b9daa4",
        "type": "ui_table",
        "z": "ef64e5df.b58d9",
        "group": "a158aa65.c97cd",
        "name": "Inventario",
        "order": 2,
        "width": "14",
        "height": "6",
        "columns": [],
        "outputs": 0,
        "cts": false,
        "x": 400,
        "y": 220,
        "wires": []
    },
    {
        "id": "c04fc8c7.592238",
        "type": "inject",
        "z": "ef64e5df.b58d9",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "ui_control.tabulator",
                "v": "{\t \"dataTree\": true,\t \"dataTreeStartExpanded\": true\t}",
                "vt": "jsonata"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[\t {\t \"nombre\": \"acceso\",\t \"rd\": \"361\",\t \"RTs a importar\":\"\",\t \"Nombre RT\":\"\",\t \"_children\":\t [\t {\"RTs a importar\":\"target:1234:321\", \"Nombre RT\":\"primero\"},\t {\"RTs a importar\": \"target:1234:432\"}\t]\t },\t {\t \"nombre-vrf\": \"gestion\",\t \"rd\": \"1234:100\",\t \"RTs a importar\":\"\",\t \"_children\":\t [\t {\"RTs a importar\":\"target:1234:66\"}\t]\t }\t]",
        "payloadType": "jsonata",
        "x": 80,
        "y": 240,
        "wires": [
            [
                "2ada6432.b9daa4",
                "fe8b7855.27332"
            ]
        ]
    },
    {
        "id": "fe8b7855.27332",
        "type": "debug",
        "z": "ef64e5df.b58d9",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 330,
        "y": 140,
        "wires": []
    },
    {
        "id": "da3f9327.24123",
        "type": "inject",
        "z": "ef64e5df.b58d9",
        "name": "",
        "props": [
            {
                "p": "ui_control.tabulator",
                "v": "{\"columns\":[{\"field\":\"rd\",\"visible\":false}]}",
                "vt": "json"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 110,
        "y": 380,
        "wires": [
            [
                "e7ae9fe6.8d7b2",
                "2ada6432.b9daa4"
            ]
        ]
    },
    {
        "id": "e7ae9fe6.8d7b2",
        "type": "debug",
        "z": "ef64e5df.b58d9",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 530,
        "y": 440,
        "wires": []
    },
    {
        "id": "a158aa65.c97cd",
        "type": "ui_group",
        "name": "Tabla",
        "tab": "3dd69d8b.6e4f72",
        "order": 3,
        "disp": true,
        "width": "14",
        "collapse": false
    },
    {
        "id": "3dd69d8b.6e4f72",
        "type": "ui_tab",
        "name": "Tab 1",
        "icon": "dashboard",
        "order": 1
    }
]

```

Injecting the first message to the table node, creates a table which displays all the columns I need, plus a column which header is "\_children". I do not want to have this column shown, so I have tried several methods to hide it, one of which is injecting another message which tries to change the visibility option of that column to false. This did not work, so I tried hiding another column (rd), suspecting that maybe the \_children column is an special one. This did not work either, the rd column is not been hidden. Now I have run out of ideas.

Any help would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [27 October 2022 08:42 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/2 "2022-10-27T08:42:38Z")

</div>

You would send a object in payload with command and arguments  
e.g.

```auto
[{"id":"c04fc8c7.592238","type":"inject","z":"ef64e5df.b58d9","name":"","props":[{"p":"payload"},{"p":"ui_control.tabulator","v":"{\"dataTree\":true,\"dataTreeStartExpanded\":true}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"nombre\":\"acceso\",\"rd\":\"361\",\"RTs a importar\":\"\",\"Nombre RT\":\"\",\"_children\":[{\"RTs a importar\":\"target:1234:321\",\"Nombre RT\":\"primero\"},{\"RTs a importar\":\"target:1234:432\"}]},{\"nombre-vrf\":\"gestion\",\"rd\":\"1234:100\",\"RTs a importar\":\"\",\"_children\":[{\"RTs a importar\":\"target:1234:66\"}]}]","payloadType":"json","x":80,"y":240,"wires":[["2ada6432.b9daa4","fe8b7855.27332"]]},{"id":"2ada6432.b9daa4","type":"ui_table","z":"ef64e5df.b58d9","group":"2d4fe667.28f8ba","name":"Inventario","order":2,"width":"0","height":"0","columns":[],"outputs":0,"cts":false,"x":400,"y":220,"wires":[]},{"id":"fe8b7855.27332","type":"debug","z":"ef64e5df.b58d9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":330,"y":140,"wires":[]},{"id":"da3f9327.24123","type":"inject","z":"ef64e5df.b58d9","name":"hide","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"hideColumn\",\"arguments\":[\"rd\"]}","payloadType":"json","x":110,"y":380,"wires":[["e7ae9fe6.8d7b2","2ada6432.b9daa4"]]},{"id":"401a7811be27a16d","type":"inject","z":"ef64e5df.b58d9","name":"show","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"showColumn\",\"arguments\":[\"rd\"]}","payloadType":"json","x":110,"y":440,"wires":[["2ada6432.b9daa4"]]},{"id":"e7ae9fe6.8d7b2","type":"debug","z":"ef64e5df.b58d9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":440,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

most tabulator commands work, I found the commands [here](https://tabulator.info/docs/5.4/columns#:~:text=You%20can%20hide%20a%20visible,first%20parameter%20of%20the%20function.&text=Alternatively%20if%20you%20have%20the,function%20directly%20on%20the%20component.)

---

<div class="post-metadata">

**Author:** ![fjorge](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@fjorge](https://discourse.nodered.org/u/fjorge)\
**Post date:** [27 October 2022 10:22 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/3 "2022-10-27T10:22:59Z")

</div>

Thanks, this works fine!!!

Is there a way to hide the column from the message that creates the table, ie, not needing to send a message to hide the column, but directly creating it hidden?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [27 October 2022 10:39 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/4 "2022-10-27T10:39:21Z")

</div>

Sure, remove the property from the objects in the array.  
e.g.

```auto
[{"id":"3f4fe15e311e3d2a","type":"inject","z":"ef64e5df.b58d9","name":"","props":[{"p":"payload"},{"p":"ui_control.tabulator","v":"{\"dataTree\":true,\"dataTreeStartExpanded\":true}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"nombre\":\"acceso\",\"rd\":\"361\",\"RTs a importar\":\"\",\"Nombre RT\":\"\",\"_children\":[{\"RTs a importar\":\"target:1234:321\",\"Nombre RT\":\"primero\"},{\"RTs a importar\":\"target:1234:432\"}]},{\"nombre-vrf\":\"gestion\",\"rd\":\"1234:100\",\"RTs a importar\":\"\",\"_children\":[{\"RTs a importar\":\"target:1234:66\"}]}]","payloadType":"json","x":130,"y":520,"wires":[["1029542c6833d714"]]},{"id":"1029542c6833d714","type":"change","z":"ef64e5df.b58d9","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$$.payload ~> |$|{},[\"_children\"]|","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":480,"wires":[["3a3056228d5c4a7f","17ba17233c04a23b"]]},{"id":"3a3056228d5c4a7f","type":"ui_table","z":"ef64e5df.b58d9","group":"2d4fe667.28f8ba","name":"Inventario","order":2,"width":"0","height":"0","columns":[],"outputs":0,"cts":false,"x":450,"y":500,"wires":[]},{"id":"17ba17233c04a23b","type":"debug","z":"ef64e5df.b58d9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":380,"y":420,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

Jsonata expression using [transform](https://docs.jsonata.org/other-operators#-------transform)

```auto
$$.payload ~> |$|{},["_children"]|

```

---

<div class="post-metadata">

**Author:** ![fjorge](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@fjorge](https://discourse.nodered.org/u/fjorge)\
**Post date:** [27 October 2022 11:28 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/5 "2022-10-27T11:28:23Z")

</div>

Thanks for your help, but that is not exactly what I was looking for.

What I need:

```auto
 Nombre rd RTs a importar Nombre RT
 ----------------------------------------------------------------------
 - acceso 361 target:1234:321 primero
 └ target:1234:432
 gestion 1234:100 target:1234:66

```

What I am getting with the Jsonata approach:

```auto
 Nombre rd RTs a importar Nombre RT
 ----------------------------------------------------------------------
 acceso 361                         
              1234:100      

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [27 October 2022 11:51 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/6 "2022-10-27T11:51:21Z")

</div>

I did not notice the nested info, you could try this

```auto
[{"id":"b54e4d934d0bd952","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"ui_control.tabulator","v":"{\"dataTree\":true,\"dataTreeStartExpanded\":true}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"nombre\":\"acceso\",\"rd\":\"361\",\"RTs a importar\":\"\",\"Nombre RT\":\"\",\"_children\":[{\"RTs a importar\":\"target:1234:321\",\"Nombre RT\":\"primero\"},{\"RTs a importar\":\"target:1234:432\"}]},{\"nombre-vrf\":\"gestion\",\"rd\":\"1234:100\",\"RTs a importar\":\"\",\"_children\":[{\"RTs a importar\":\"target:1234:66\"}]}]","payloadType":"json","x":110,"y":700,"wires":[["f2a78d558a595fec","b43c2a0eeaac32e9"]]},{"id":"f2a78d558a595fec","type":"debug","z":"452103ea51141731","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":520,"y":660,"wires":[]},{"id":"b43c2a0eeaac32e9","type":"trigger","z":"452103ea51141731","name":"","op1":"","op2":"{\"command\":\"deleteColumn\",\"arguments\":[\"_children\"]}","op1type":"pay","op2type":"json","duration":"10","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":330,"y":720,"wires":[["5d02bf8047e5f83d"]]},{"id":"5d02bf8047e5f83d","type":"ui_table","z":"452103ea51141731","group":"2d4fe667.28f8ba","name":"Inventario ","order":2,"width":"12","height":"9","columns":[],"outputs":0,"cts":false,"x":600,"y":740,"wires":[]},{"id":"360ca0f5e45fb0ed","type":"inject","z":"452103ea51141731","name":"addColumn","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"addColumn\",\"arguments\":[{\"title\":\"_children\",\"field\":\"_children\",\"data\":[{\"_children\":\"test\"},{\"_children\":\"test2\"}]},false,\"Nombre RT\"]}","payloadType":"json","x":130,"y":840,"wires":[["792e6b3b88e9d0cb","5d02bf8047e5f83d"]]},{"id":"a30939859c7d6184","type":"inject","z":"452103ea51141731","name":"deleteColumn","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"deleteColumn\",\"arguments\":[\"_children\"]}","payloadType":"json","x":130,"y":900,"wires":[["5d02bf8047e5f83d"]]},{"id":"792e6b3b88e9d0cb","type":"debug","z":"452103ea51141731","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":720,"y":960,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![fjorge](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@fjorge](https://discourse.nodered.org/u/fjorge)\
**Post date:** [27 October 2022 16:08 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/7 "2022-10-27T16:08:23Z")

</div>

Great!!! This works like a charm!!

Thanks a lot for all your help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 November 2022 16:08 UTC](https://discourse.nodered.org/t/unable-to-hide-column-in-node-red-node-ui-table/69661/8 "2022-11-26T16:08:23Z")

</div>

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