Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
jsartisan opened this issue Dec 6, 2021 · 12 comments
Open
1 task done
Labels
App Viewers Pod This label assigns issues to the app viewers pod Enhancement New feature or request High This issue blocks a user from building or impacts a lot of users Table Widget

Comments

@jsartisan
Copy link
Contributor

jsartisan commented Dec 6, 2021

Is there an existing issue for this?

  • I have searched the existing issues

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

@jsartisan jsartisan added Enhancement New feature or request Table Widget labels Dec 6, 2021
@github-actions github-actions bot added App Viewers Pod This label assigns issues to the app viewers pod UI Building Pod labels Dec 6, 2021
@khyoz
Copy link

khyoz commented Dec 6, 2021

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
Copy link
Contributor

@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
Copy link
Contributor

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
  • Need a way to save (CRUD) filters at a user level. Need a user level store in appsmith or devs have to save these filters somewhere in their backend.
  • Once saved, need a way to apply these filters back to the table. This can be a bit tricky because the table data can be dynamic and all the filters may not end up working.

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
Copy link
Contributor

dilippitchika commented Apr 15, 2022

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

@Nikhil-Nandagopal Nikhil-Nandagopal changed the title [Feature]: Ability to save filters in table widget and reuse them. [Feature]-[500]:Ability to save filters in table widget and reuse them. Apr 15, 2022
@ame-appsmith
Copy link

Another user requested this feature.

@TabsorDevGO
Copy link

Any updates on this?
Did someone implemented workaround?

@dilippitchika
Copy link
Contributor

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

@josiah-roberts
Copy link

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
Copy link
Contributor

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
Copy link

thebadking commented Nov 9, 2022

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

@franzpro
Copy link

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
Copy link

leflooo commented Mar 20, 2023

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

@somangshu somangshu added the High This issue blocks a user from building or impacts a lot of users label Mar 31, 2023
@Nikhil-Nandagopal Nikhil-Nandagopal changed the title [Feature]-[500]:Ability to save filters in table widget and reuse them. [Feature]-[2000]:Ability to save filters in table widget and reuse them. Mar 31, 2023
@somangshu somangshu removed their assignment Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Viewers Pod This label assigns issues to the app viewers pod Enhancement New feature or request High This issue blocks a user from building or impacts a lot of users Table Widget
Projects
None yet
Development

No branches or pull requests