# UI\_table: remove headers and filter rows

**URL:** https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213
**Category:** Dashboard
**Created:** [19 November 2020 19:23 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213 "2020-11-19T19:23:13Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Laurent](https://discourse.nodered.org/u/Laurent)
#### Post date: [19 November 2020 19:23 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/1 "2020-11-19T19:23:13Z")

</div>

The UI\_table node is doing me a great service!  
I use it to display data from a 5 column csv file (c1, c2, text, photo, pj) of which I only display the last 3. But since I'm a newbe, I can't seem to remove the header row (I've already removed the column titles because the cell content is self-explanatory that I can do without it, but the lines and arrows remain visible).  
I was also wondering if this node can filter data.  
In fact, I would like to display only rows whose 1st column value is\> = X and second column value is \<= X. I tried with the function node but not having any programming skills, I did not succeed.  
I searched everywhere on the forum and on google but I can't find it and I'm going in circles.  
Could anyone please advise me?  
Laurent

```auto
[{"id":"f94e2f2.4492cd","type":"inject","z":"d217e624.c76d68","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":560,"wires":[["9babb54f.052fc8"]]},{"id":"9babb54f.052fc8","type":"file in","z":"d217e624.c76d68","name":"Read database test","filename":"/home/pi/.local/share/test.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":150,"y":660,"wires":[["8e040841.729cc8","e4bfa8de.3c58a8"]]},{"id":"8e040841.729cc8","type":"csv","z":"d217e624.c76d68","name":"CSV","sep":",","hdrin":true,"hdrout":"","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":false,"x":110,"y":700,"wires":[["bfffece9.7d382","baf69f4f.fbfc8"]]},{"id":"e4bfa8de.3c58a8","type":"debug","z":"d217e624.c76d68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":430,"y":660,"wires":[]},{"id":"bfffece9.7d382","type":"debug","z":"d217e624.c76d68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":430,"y":740,"wires":[]},{"id":"baf69f4f.fbfc8","type":"ui_table","z":"d217e624.c76d68","group":"835074f4.0b4148","name":"table \"test\"","order":3,"width":"0","height":"0","columns":[{"field":"photo","title":"","width":"15%","align":"center","formatter":"image","formatterParams":{"target":"_blank"}},{"field":"txt","title":"","width":"80%","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"pj","title":"","width":"5%","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":650,"y":700,"wires":[]},{"id":"835074f4.0b4148","type":"ui_group","z":"","name":"test","tab":"d52da53e.8c3c58","order":1,"disp":true,"width":"6","collapse":false},{"id":"d52da53e.8c3c58","type":"ui_tab","z":"","name":"Tab test","icon":"dashboard","order":16,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [21 November 2020 15:15 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/2 "2020-11-21T15:15:05Z")

</div>

To remove the header, send property `msg.ui_control` with

```auto
{"tabulator":{"headerVisible":false}}

```

to your ui\_table node.

Filter: Maybe this page can help you [source](http://www.tabulator.info/)

---

<div class="post-metadata">

### Author: ![Laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Laurent](https://discourse.nodered.org/u/Laurent)
#### Post date: [23 November 2020 10:42 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/3 "2020-11-23T10:42:15Z")

</div>

Thank you for your reply.  
I integrated your code in a Change node with the msg.ui\_control  
and it works perfectly, thank you very much.  
However, I am unable to implement the filter in this way with the code provided on the Tabulator site. If you have an idea...

Laurent

---

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [23 November 2020 12:13 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/4 "2020-11-23T12:13:24Z")

</div>

Hi Laurant.

Filter: What is your input and what filter criteria schould be applied?

Henning

---

<div class="post-metadata">

### Author: ![Laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Laurent](https://discourse.nodered.org/u/Laurent)
#### Post date: [23 November 2020 12:39 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/5 "2020-11-23T12:39:38Z")

</div>

Hello Henning,  
I'am at work until 18h. Could I answer you after ?  
Laurent

---

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [23 November 2020 18:05 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/6 "2020-11-23T18:05:34Z")

</div>

Hahah. We don't have here service level agreements about response time ;-).  
Don't worry. Best would be to get a simple table in JSON and criteria.

Best regards, Henning

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [23 November 2020 20:43 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/7 "2020-11-23T20:43:56Z")

</div>

Hi ... I had a quick look but without demo data it is quite difficult:

```auto
var doy = flow.get("doy")

msg.ui_control = {tabulator:{}};

table.setFilter([
    {field:"date_debut", type:">=", value:doy},
    {field:"date_fin", type:"<=", value:doy },
]);

msg.ui_control.tabulator[msg.topic]=msg.payload;
return msg;

```

There is a lot of things going wrong ...

ui\_control sets and updates the layout / appearance and some callback functions. So everything you can setup when the table is created. (Basically everything described under **Layout** in the docs)

What you try to do is sending a command (aka calling a **function** ) to an existing table. And yes, that's possible:

This form the tabulator docs:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0ec1c3742c09beb2d4cb923a60f69e974c7e913c.png)  
assumes that you have access to the table object (from within the browser). But your script is running on node red perhaps on the other side of the world 😉

So you have to send your command to the ui-table node which send it to the dashboard on another browser (or tab) and do the job for you.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9eda9505e4cb0d132bde3addd0c0366979c0d94c.png)

So this could work or give you a kickstart:

```auto
msg.payload={
    command: "setFilter",
    arguments: 
        [
            [
                {field:"date_debut", type:">=", value:doy},
                {field:"date_fin", type:"<=", value:doy }
            ]
        ],
    returnPromise: false
}
return msg;

```

**Note** that the arguments property is an **array** as command can have multiple arguments. The first argument of `setFilter` expects an array of objects. So another **array**.

Send this msg to ui-table and you should get your filters set (open the development tools in your browser to see if you get any console error messages) They appear in the browser where the dashboard is running and not in the editors debug tab!

---

<div class="post-metadata">

### Author: ![Laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Laurent](https://discourse.nodered.org/u/Laurent)
#### Post date: [23 November 2020 21:08 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/8 "2020-11-23T21:08:31Z")

</div>

Good evening Chris and many thanks for your long and detailed response. I immediately launch into the discovery of the elements that you sent me and will keep you informed tomorrow of my progress.  
Thank you again for your help,  
Laurent

---

<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: [23 December 2020 21:08 UTC](https://discourse.nodered.org/t/ui-table-remove-headers-and-filter-rows/36213/9 "2020-12-23T21:08:37Z")

</div>

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