# Tabulator Filter

**URL:** <https://discourse.nodered.org/t/tabulator-filter/45646>\
**Category:** Dashboard\
**Created:** [14 May 2021 13:36 UTC](https://discourse.nodered.org/t/tabulator-filter/45646 "2021-05-14T13:36:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zahir86](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zahir86/32/41760_2.png) [@zahir86](https://discourse.nodered.org/u/zahir86)\
**Post date:** [14 May 2021 13:36 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/1 "2021-05-14T13:36:20Z")

</div>

Hello,

id like to implement in my project this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5bf614c2cd6fc3a45c860a569740cab48478c37.png)

in which node i have to insert?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c7f3a74765a1a2d5315e440def3e14660513a413.png)

Now i inserted javascrip code in template node but filter not worked

Thank you very much for your support

---

<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:** [14 May 2021 23:32 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/2 "2021-05-14T23:32:35Z")

</div>

You can use ui-table. This is based on tabulator. Using ui\_control messages you can basically use the full capacity of tabulator.

---

<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:** [17 May 2021 11:30 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/3 "2021-05-17T11:30:11Z")

</div>

Perhaps my last answer was a little bit short (posted on the go), sorry for that

What I wanted to suggest. You can place a dropdonw widget as a field selector and type together with an input widget for the value and collect the outputs (perhaps in flow context). A button widget can then send a command to activate the filter function of tabulator:

Example:

The javascript code: `table.setFilter("age", ">", 10);` translate to this message to be send to ui-table to activate the filter

```auto
{"payload":{
    "command":"setFilter",
    "arguments":[
        "age",
        ">",
        "10"
    ],
    "returnPromise":false
    }
}

```

Note: I have not tested the code.

---

<div class="post-metadata">

**Author:** ![zahir86](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zahir86/32/41760_2.png) [@zahir86](https://discourse.nodered.org/u/zahir86)\
**Post date:** [17 May 2021 14:09 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/4 "2021-05-17T14:09:15Z")

</div>

thank you Christian!  
for download command is the same?

---

<div class="post-metadata">

**Author:** ![zahir86](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zahir86/32/41760_2.png) [@zahir86](https://discourse.nodered.org/u/zahir86)\
**Post date:** [17 May 2021 14:37 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/5 "2021-05-17T14:37:21Z")

</div>

i have to do like this

msg.payload={  
command:"download",  
arguments: ,  
returnPromise: true  
}  
return msg;

?

---

<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:** [22 May 2021 22:30 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/6 "2021-05-22T22:30:40Z")

</div>

Sorry I wasn’t notified about your question because you probably did not reply on my message ...

Can you please use the `Preformatted text` Function when you post code, this makes it easier to read.

```auto

table.download("csv", "data.csv", {delimiter:"."}); //download a CSV file that uses a fullstop (.) delimiter

```

The download function has one necessary (type) and two optional parameters (filename and options). And no promise. So you are close

---

<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 May 2021 13:16 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/7 "2021-05-23T13:16:42Z")

</div>

Put this into a button widget as payload (JSON)

```auto
{
    "command": "download",
    "arguments": [
        "csv",
        "table.csv",
        {
            "delimiter": ";"
        }
    ],
    "returnPromise": false
}

```

Like this node

```auto
[{"id":"535ce004.8832e","type":"ui_button","z":"c4712650.59b5e8","name":"","group":"ff9fdb9a.7da098","order":14,"width":"4","height":"1","passthru":false,"label":"Download","tooltip":"click to download","color":"","bgcolor":"","icon":"","payload":"{\"command\":\"download\",\"arguments\":[\"csv\",\"table.csv\",{\"delimiter\":\";\"}],\"returnPromise\":false}","payloadType":"json","topic":"","topicType":"str","x":706,"y":1190,"wires":[["2e6a6379.742abc"]]},{"id":"ff9fdb9a.7da098","type":"ui_group","name":"TEST","tab":"7dcc246f.ee661c","order":1,"disp":false,"width":"8","collapse":false},{"id":"7dcc246f.ee661c","type":"ui_tab","name":"TEST","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

```

This time the code is tested 😉

---

<div class="post-metadata">

**Author:** ![zahir86](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zahir86/32/41760_2.png) [@zahir86](https://discourse.nodered.org/u/zahir86)\
**Post date:** [24 May 2021 06:26 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/8 "2021-05-24T06:26:49Z")

</div>

Thank you Christian!!!

---

<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 June 2021 06:27 UTC](https://discourse.nodered.org/t/tabulator-filter/45646/9 "2021-06-23T06:27:49Z")

</div>

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