Guides

How to Filter a Retool Table by Hidden Columns

OTC Team··4 min read
How to Filter a Retool Table by Hidden Columns

If you're trying to filter a Retool table by hidden columns and the column isn't showing up in the filter dropdown, you're not alone. This is one of the most common friction points when building data-heavy internal tools in Retool. The table component's built-in filter UI only surfaces columns that are currently visible — but your data often contains columns you want to filter on without cluttering the user interface. This guide covers exactly what's happening and the two most reliable ways to work around it.

Why Hidden Columns Don't Appear in Retool's Table Filter UI

Retool's table component distinguishes between removing a column and hiding a column. A removed column is stripped out of the table entirely. A hidden column still exists in the underlying data source but is not rendered visually. For a period, Retool did allow hidden columns to appear in the filter UI — but as of recent table component updates, the built-in filter button no longer exposes hidden columns as filterable options. The Retool team has acknowledged this behavior change and noted that user feedback is being tracked, so a native fix may arrive in a future release. Until then, you need one of the two workarounds below.

Workaround 1: Use table.setFilters() Programmatically

The most direct solution is to apply filters in code using the table.setFilters() method. This approach bypasses the filter UI entirely and lets you filter on any column in the underlying dataset — visible or hidden.

Here's the basic syntax:

table1.setFilters([{ columnName: 'MEDIA_AREA', operator: 'equals', filterValue: 25 }])

You can trigger this from an event handler, a button component, or any other interaction in your app. Here's how to set it up step by step:

  • Add a Button or Select component to your canvas to capture the user's filter input.
  • In the component's event handler (e.g. onChange or onClick), choose Run script as the action.
  • In the script editor, call table1.setFilters([{ columnName: 'YOUR_HIDDEN_COLUMN', operator: 'equals', filterValue: select1.value }]) — replacing table1 with your table's name, YOUR_HIDDEN_COLUMN with the exact column key from your data source, and select1.value with whatever input you're reading from.
  • Supported operators include 'equals', 'notEquals', 'contains', 'notContains', 'isEmpty', and 'isNotEmpty'.
  • To clear the filter, call table1.setFilters([]).

This is the right approach when you need precise, code-controlled filtering — for example, filtering a table by a numeric ID, a status flag, or a long free-text field that you never want to render in the table UI.

Workaround 2: Use the Standalone Filter Component

If you want to give users a self-service filter experience without writing JavaScript, the standalone Filter component is your best option. Unlike the table's built-in filter button, the standalone Filter component still supports filtering by hidden columns.

  • From the component panel, drag a Filter component onto your canvas.
  • In the Filter component's settings, find the Connect to table option and select your table component (e.g. table1).
  • The Filter component will automatically read the full schema of the connected table's data source, including hidden columns.
  • Users can now build filter rules against any column in the dataset — whether or not that column is visible in the table.

This workaround is ideal when you want users to filter on metadata or internal fields (like a raw ID, a category code, or a long description field) without exposing those columns in the table view itself.

What About the Opposite Problem — Hiding a Column From the Filter UI?

Some developers run into the inverse issue: they have a hidden column that does show up in the filter UI and they want to suppress it. As of now, Retool doesn't offer a per-column setting to control whether a hidden column appears in filter options. The Retool team has confirmed this is on their radar. The cleanest workaround today is to use table.setFilters() exclusively and disable the built-in filter button altogether, giving you complete control over what filter options are exposed to users.

Choosing the Right Approach

  • Use table.setFilters() when you need programmatic, event-driven filtering — especially for system-defined filters the user doesn't control directly.
  • Use the standalone Filter component when you want a user-facing filter UI that includes hidden columns without any custom JavaScript.
  • Combine both if you have some filters that are always applied (via setFilters()) and others that users configure themselves (via the Filter component).

The built-in table filter UI is convenient, but it's not the only tool available. Once you know that table.setFilters() and the standalone Filter component both operate on the full underlying dataset, filtering by hidden columns in Retool becomes straightforward. If you're building a tool where clean table presentation matters but powerful filtering is also required, this pattern — hide the column in the table, filter on it via the standalone component or script — is a solid, production-ready approach.

Ready to build?

We scope, design, and ship your Retool app — fast.

Ready to ship your first tool?