# Set filter with a button

**URL:** <https://connect.superhuman.com/t/set-filter-with-a-button/7206>\
**Category:** Ask the Community\
**Created:** [March 27, 2019, 10:36am UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206 "2019-03-27T10:36:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Huttmeier](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/max_huttmeier/32/6095_2.png) [@Max\_Huttmeier](https://connect.superhuman.com/u/Max_Huttmeier)\
**Post date:** [March 27, 2019, 10:36am UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/1 "2019-03-27T10:36:27Z")

</div>

Hi everybody  
I would like to put a filter of the table in the section via a button.  
I can not get it though. Can someone give me an example?  
The filter in the table to set directly works fine but the button does not work

---

<div class="post-metadata">

**Author:** ![Jean\_Pierre\_Traets](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/jean_pierre_traets/32/16275_2.png) [@Jean\_Pierre\_Traets](https://connect.superhuman.com/u/Jean_Pierre_Traets)\
**Post date:** [March 27, 2019, 11:46am UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/2 "2019-03-27T11:46:38Z")

</div>

Dear @Max_Huttmeier,

As far as my knowledge goes, you will need to create **a control** to be able to filter your table, buttons do not have this functionality  
Below is one of the many supporting materials available:  
[https://help.coda.io/controls/filtering-tables-and-views-based-on-controls](https://help.coda.io/controls/filtering-tables-and-views-based-on-controls)

Hopeful I have been putting you in the right direction.

Best regards,  
//JP

---

<div class="post-metadata">

**Author:** ![Krunal\_Sheth](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/krunal_sheth/32/5936_2.png) [@Krunal\_Sheth](https://connect.superhuman.com/u/Krunal_Sheth)\
**Post date:** [March 27, 2019, 4:42pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/3 "2019-03-27T16:42:16Z")

</div>

@Max_Huttmeier

As @Jean_Pierre_Traets mentioned, the best way would be to use existing controls to use as a filter.

I could see that in some cases you want to use buttons - here’s an example how you could do it. Doesn’t scale for all cases (like where you have big set of possible values to filter on)

https://coda.io/embed/3EjWiAcjES/_suIHV?viewMode=embedplay

---

<div class="post-metadata">

**Author:** ![Max\_Huttmeier](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/max_huttmeier/32/6095_2.png) [@Max\_Huttmeier](https://connect.superhuman.com/u/Max_Huttmeier)\
**Post date:** [March 27, 2019, 5:53pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/4 "2019-03-27T17:53:35Z")

</div>

Thanks for your advice. But my approach is different:  
If a user in a view has filtered and sorted the data differently, he should be able to set a standard filter and a standard sorting with the button again.  
So I need a function that writes a filter statement in the table filter and thus restores a standard.  
Is this possible?  
Greetings from cologne / germany

---

<div class="post-metadata">

**Author:** ![Shaun\_McLean](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/shaun_mclean/32/10662_2.png) [@Shaun\_McLean](https://connect.superhuman.com/u/Shaun_McLean)\
**Post date:** [March 27, 2019, 9:34pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/5 "2019-03-27T21:34:47Z")

</div>

I like the idea; I don’t think it’s possible the way you’re intending to do it. You can do what Krunal suggested and turn the filter criteria into a column but that complicates it.

It would be nice to store a set of filters and sorts to a data set. Power BI has a similar feature called bookmarking. I’d be all for it.

---

<div class="post-metadata">

**Author:** ![Ander](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ander/32/9134_2.png) [@Ander](https://connect.superhuman.com/u/Ander)\
**Post date:** [March 27, 2019, 10:10pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/6 "2019-03-27T22:10:11Z")

</div>

> [@Shaun\_McLean](#):
>
> It would be nice to store a set of filters and sorts to a data set. Power BI has a similar feature called bookmarking. I’d be all for it.

+1 on being able to save different configurations of filtering/sorting rules.

Having the ability to toggle between pre-saved configurations would be a huge time saver.

In most of my projects this would eliminate ~70% of my Views (plus navigating to those views and waiting for them to load).

It would also save the time and effort of rebuilding filter/sort rules after deleting them or modifying them for various purposes that don’t warrant separate views.

---

<div class="post-metadata">

**Author:** ![Shaun\_McLean](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/shaun_mclean/32/10662_2.png) [@Shaun\_McLean](https://connect.superhuman.com/u/Shaun_McLean)\
**Post date:** [March 28, 2019, 12:04am UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/7 "2019-03-28T00:04:10Z")

</div>

I was actually digging around a bit. There’s a hacky way to do it:

> [@Hack to filter lots of data](https://connect.superhuman.com/t/hack-to-filter-lots-of-data/542/9):
>
> Hi, For the lookup columns I added ToText() and then it works fine. Lower(Description+","+FormulaSelect.ToText()+","+[Doc\<\>]) Does this work for you.

---

<div class="post-metadata">

**Author:** ![alden](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/alden/32/7604_2.png) [@alden](https://connect.superhuman.com/u/alden)\
**Post date:** [April 23, 2019, 4:14pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/8 "2019-04-23T16:14:03Z")

</div>

Here’s another example of how to filter a table using a button:

https://coda.io/embed/_K-zpMxpjN/_sugc6?viewMode=embedplay&hideSections=true

This has a separate table of filter settings that you can enable/disable via buttons on the canvas.

---

<div class="post-metadata">

**Author:** ![Lois\_Boutrash](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/lois_boutrash/32/13937_2.png) [@Lois\_Boutrash](https://connect.superhuman.com/u/Lois_Boutrash)\
**Post date:** [February 22, 2020, 11:27pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/10 "2020-02-22T23:27:05Z")

</div>

Because I searched for a while: in the formula for the filter, the row from the “Filter Settings” table is reached using “@”, in this case `@Show Done?`

---

<div class="post-metadata">

**Author:** ![Derek\_Vulliemin](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/derek_vulliemin/32/24579_2.png) [@Derek\_Vulliemin](https://connect.superhuman.com/u/Derek_Vulliemin)\
**Post date:** [February 23, 2022, 8:43pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/11 "2022-02-23T20:43:26Z")

</div>

Hi everyone,

I found an easy way to display both checked and unchecked row.

1. Create a “Done” column with a Checkbox type

2. **Filter 1** - Create filter based on the “Done” column, set as “is unchecked”.

3. **Filter 2** Create a second filter based on the “Done” column, set as “is checked”.

4. Use the “Or” operator between filters 1 and 2.

5. **Filter 3** - Add an interactive filter for the “Done” column.

6. Use the “And” operator between filters 2 and 3.

Filters setting should look like this:

![image](https://global.discourse-cdn.com/coda1/original/3X/d/8/d87b34a4fa9ac466dd3356ab6c3b904e16ab3a79.png)

Best

---

<div class="post-metadata">

**Author:** ![Lena\_Webster](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/lena_webster/32/16774_2.png) [@Lena\_Webster](https://connect.superhuman.com/u/Lena_Webster)\
**Post date:** [March 1, 2022, 6:22pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/12 "2022-03-01T18:22:10Z")

</div>

Hey all - just came across this thread and wanted to share an update. The [launch of our SetControlValue formula](https://connect.superhuman.com/t/launched-set-control-value-action/22658) may actually provide an easier solution to this problem. You can take [Alden’s earlier suggestion](https://connect.superhuman.com/t/set-filter-with-a-button/7206/8), but you no longer need to use a second table for the checkbox. You can just build the checkbox control right into the canvas (or a hidden page), and the button can take action on that control using the new formula.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/system/32/24484_2.png) [@system](https://connect.superhuman.com/u/system)\
**Post date:** [March 4, 2022, 6:22pm UTC](https://connect.superhuman.com/t/set-filter-with-a-button/7206/13 "2022-03-04T18:22:13Z")

</div>

Closed on March 4, 2022, 6:22pm UTC

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