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.
example:
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.
You can use Query JSON with SQL and query against the table data.
select customer from {{formatDataAsArray(table1.data)}} where first_name = {{select1.value}} and city = {{select2.value}}
Where select1 component contains an array of all distinct first_names found in table1.data and select2.value component contains an array of all distinct cities found in table1.data (though each select component could be populated from other data sources
Hope this makes sense.
And so on...you may also need to account for when no "filters" are selected.
@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?
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 {{query5.data}} in your table component.