Set filter with a button

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

2 Likes

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

Hopeful I have been putting you in the right direction.

Best regards,
//JP

1 Like

@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)

2 Likes

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

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.

1 Like

+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.

2 Likes

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

2 Likes

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

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

5 Likes

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?

1 Like

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

Best

Hey all - just came across this thread and wanted to share an update. The launch of our SetControlValue formula may actually provide an easier solution to this problem. You can take Alden’s earlier suggestion, 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.

2 Likes

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