I need to add a functionality in my application to save the filters?

In my application there are different pages and those pages contains lists. Every page has an option to filter a list using the attributes that are present in the lists. I want to add the functionality to provide the user with the option to save the filters so that they don't have to set the filters again. Any ideas??

mvp_badge
MVP

Hi RH 1023,

You can use client variable if you are using the reactive web app and for tradition you can use session variable.

https://www.outsystems.com/training/lesson/2037/client-variables 

Regards,

Manish Jawla

Hi RH 1023,

If you just need to store these filters in local browser (this means if user uses another browser or login in another location, these restored filters will not work), then you can store in local variables or WebSQL. Please refer to Local variable and WebSQL

If users want to store in DB(this means these filters will work anywhere user want to use, another browser, another location), you may need to restore in DB, you need to create entities to restore these filters.

Yes this is what I am looking for, I don't want to store the filters in client or session variables, I want users to save upto 5 filters, display it in a list and then user can use whatever filter he/she has saved. How to do it?

mvp_badge
MVP

HI RH 1023,

Can you share your sample oml. I will create the functionality to store filters in db and retrieve it back on the basis of user Id. or you can create a table and store the fields values in db against user id and use them.

Regards,

Manish Jawla

Can you please share a sample OML so that we can understand your requirement better.


Thanks,

Sandeep.

mvp_badge
MVP

Hi RH,


I am attaching the sample for you to store filter and retrieve it back on the basis of user id.

Hope this helps.

Regards,

Manish Jawla

demoFilter.oml

Hi @Manish Jawla suggested you can you use client variables if you're not going to store any sensitive information, as this can be tampered by smart users.


Thanks,

Sandeep.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.