# How do I set filter in ui-table from a command

**URL:** <https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371>\
**Category:** Dashboard\
**Tags:** dashboard-2, ui-table\
**Created:** [30 July 2025 02:51 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371 "2025-07-30T02:51:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [30 July 2025 02:51 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/1 "2025-07-30T02:51:46Z")

</div>

I am generating a table using mysql queries and ui-table in dashboard-2.

how can I set filter for a column be sending a msg.payload ? (from a dropdown for example)

could not find any example or a discussion in forum for this topic, some available for dashbaord-1

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [30 July 2025 07:54 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/2 "2025-07-30T07:54:20Z")

</div>

Not something we support out of the box currently

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [30 July 2025 08:02 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/3 "2025-07-30T08:02:58Z")

</div>

Is it possible by using ui-template ? any hint or direction towards solution appreciated. 🙏

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 July 2025 08:12 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/4 "2025-07-30T08:12:15Z")

</div>

You could filter the data in the sql query before sending it to the table.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [30 July 2025 08:38 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/5 "2025-07-30T08:38:11Z")

</div>

Yes, that is my current setup. however, i am trying to reduce the time taken for creating a table for updating the downtime in each machine.  
trying to explain.

1. I have 20 machines connected to a PLC
2. The data about production is updated every minute by the way of count of product in the last minute for each machine
3. the main database is hence a table of count of product for each machine updated every clock minute with a timestamp
4. now, at the end of a shift of 8 hours, i am asking the shift executive to update the downtime reasons.
5. upon selecting a machine, the NR flow calculates the downtime (where count is zero) period by going through the database and creating another temporary table to effectively give the Machine/From Time / TO Time /Duration and a space holder for him to enter / select a downtime reason from a dropdown (which also comes from a database)
6. this takes a while for each machine, and I want to automate this process of 'calculating' the downtime for ALL machines simultaneously without him need to select the machine each time he is done with one.
7. I found that making a single table with all machines with downtime data is somehow faster and easier for the operator.
8. but this is overwhelming for him to see all data at once on a screen, so i would like to filter the machines by clicking a button for each machine or by a dropdown, at this point all the calculations are already done, and i dont want to invoke a mysql query again to display the table, just want to show / hide relevant data.
9. I am not sure i am making a valid point here, since
10. _if you cant explain something in simple sentences, then you must be doing it wrong_

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [30 July 2025 08:46 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/6 "2025-07-30T08:46:28Z")

</div>

You can consider using `@omrid01/node-red-dashboard-2-table-tabulator`, which fully supports any type of filtering (e.g. configured, dynamic, conditional), including a persistence option.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [30 July 2025 08:54 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/7 "2025-07-30T08:54:29Z")

</div>

I had given it a thought a few days back while following up a topic on forum, i will definitely look into this now.

---

<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:** [29 August 2025 08:55 UTC](https://discourse.nodered.org/t/how-do-i-set-filter-in-ui-table-from-a-command/98371/8 "2025-08-29T08:55:13Z")

</div>

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