appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.62k stars 3.73k forks source link

[Feature]-[2000]:Ability to save filters in table widget and reuse them. #9577

Open jsartisan opened 2 years ago

jsartisan commented 2 years ago

Is there an existing issue for this?

Summary

One of the user said:

A way to save filters in a table and upload or choose a set would be a great feature... already tired of recreating the filters on almost every change or run... 🤒 😆

https://discord.com/channels/725602949748752515/760761686549463060/917322581688872971

which seems a very good use-case

Why should this be worked on?

It's a bit frustrating to create filters again and again for the table widget. having the ability to save filters and reuse them would be a time saver.

Front logo Front conversations

khyoz commented 2 years ago

For example I wrote an mini app where I call an API to get some stocks, and want to filter according to 3 to 10 criterias. The data are well formatted into the table, then I press the refresh button in order to get the new values, and the table is refreshed but the filters too ! All the criterias are removed. The same case occurs when I try to change my app in edit mode, but I cannot define when with precision.

It takes a lot of time to redefine all of these criterias, so I suggest there should be a way to load/save a "variant" that contains the filters for a table. And also, the user could choose one of the saved "variants" to fill the parameters and apply them to a table. Maybe a default variant would be nice when we define the table.

I don't know how easy or difficult it could be to be implemented, but maybe, something like general variant (for all the users) or user variant (depending on role, group of users, or single user) could be very useful.

image

Thanks for your support.

Nikhil-Nandagopal commented 2 years ago

@khyoz would simply saving the last saved filter state for the table solve your problem? An extension to this would be the option to set the default filter state from the property pane and trigger an onFilterApplied listener.

dilippitchika commented 2 years ago

Adding my notes App viewers need a way to do this, there are 2 states the user is in

  1. User is starting a new session
  2. User is already in the session

If we only wish to solve for 2 where the user is already in session and we have last few filters handy, based on point 2 we will have to add these filters without dev intervention.

Will keep refining this

dilippitchika commented 2 years ago

Reach - Assuming 50% of our table users need to reuse filters constantly. Pessimistic number. Impact - Medium - Issue that frustrate users due to poor UX Effort - design+dev+QA effort combined based on solving for both user types as described above

Stats

Stat Values
Reach 2000
Effort (months) 2
ame-appsmith commented 2 years ago

Another user requested this feature.

TabsorDevGO commented 2 years ago

Any updates on this? Did someone implemented workaround?

dilippitchika commented 2 years ago

Hi @TabsorDevGO we will be picking this up soon, we are working on design details for it.

josiah-roberts commented 2 years ago

Just want to chime in that our org would majorly benefit from this; any way to programmatically manipulate, save, or default the filters would be a game changer.

dilippitchika commented 2 years ago

Hey @josiah-roberts @TabsorDevGO @khyoz thanks for commenting, we are starting design work on this project and I would like to talk to you about your use-case. Would you be open for a call to discuss more?

If yes, can you please block a slot which works for you - https://calendly.com/dilip_pitchika/30min?month=2022-10

thebadking commented 2 years ago

I would also like this feature implemented, if it can be saved as a session variable is enough

franzpro commented 1 year ago

Hi,

it would be nice if you could also set filters predefined via JS. So you have the filter activated when opening a table.

regads Franz

leflooo commented 1 year ago

my Workaround... Do some Checkboxes (or Inputfields), and change your Table query to something like this:

SELECT * FROM users WHERE active = true or active = {{Checkbox1.isChecked}};

If checked -> show only active users, If not checked -> show all.

more conditions would look something like:

... WHERE ( active = true or active = {{Checkbox1.isChecked}} ) AND ( condition = true or condition = {{Checkbox2.isChecked}} ) AND ( condition2 = true or condition2 = {{Checkbox3.isChecked}} ) ...

also you could safe the status of the checkboxes in each users storeValue