Multiple dynamic filters in tables

I need your help.

I have a table "table1" which comes from a transformer and which contains 10 columns (name, first name, age, city, car, ...) with important information.

I have created 10 selects corresponding to each column to be able to filter my table (+4000 rows currently) and my selects have in values {{item. (the concerned column) }} .

I want to be able to filter my table dynamically with any filter and have them add up if I want to fill more than one.

i have 4000 rows. i am looking for all the "Bobs".
I now have 250 rows. I want all the "Bobs" who live in "New York".
i now have 20 lines. i want all the "Bobs" in "new York" who are "20 years old".
I have 2 lines at the end.

and i want to be able to remove a filter and have it automatically filter itself.

how can i do that?

You can use Query JSON with SQL and query against the table data.

select customer from {{formatDataAsArray(}} where first_name = {{select1.value}} and city = {{select2.value}}

Where select1 component contains an array of all distinct first_names found in and select2.value component contains an array of all distinct cities found in (though each select component could be populated from other data sources

Hope this makes sense.
And so may also need to account for when no "filters" are selected.

1 Like

@ScottR, I don't understand how to link the SQL query with my table which is a fusion of a postgreSQL data query and a Trello API data query (see image 1)

My main table is well linked to my transform which merges the two tables or should I change?

The "select" filters are currently also linked to my main table to have the table proposals in order to have a perfect query.

How do I link this SQL query to filter the table?
Can COALESCE handle cases where there are no selected filters?

thank you very much

Hey @Geool!

Once you successfully write your Query JSON with SQL query, you can show the results of that query in your table. So you'd use {{}} in your table component.

Also, check out these docs that might help when writing filter queries:

Let me know if this helps at all!


1 Like