524
Views
4
Comments
Solved
How to Filter product table data as per the category filters
Application Type
Traditional Web

I am trying to create a basic E-comm Traditional web application. I am displaying all the products in Table records widget. And separately  I am displaying Total product count , Laptop count ,mobile count etc. So now If I want to display for example Only Laptops or mobiles when clicked on laptop or mobiles count, how do I change table record to display only laptops or mobiles  at runtime on the same screen ? And when I click on All , table records  should again display All the products .

2020-01-08 08-43-00
Rahul Kumar
Solution

Hi Vishal,

You have to apply filter based on product category in aggregate.

create a local/Session variable in your screen and on click of All , assign  NullIdentifier(). On click of laptop assign category of laptop and so on. 

after assignment refresh the aggregate and Table widget by ajex refresh. 

Now add filter condition in your aggregate-  

ProductCategory= NullIdentifier() or Product.Category= ProductCategory


There is good example  outsystems itself has, while creating a new screen. -> Four Column Gallery

Hope this help

E_Com.oml
UserImage.jpg
Vishal Gangwal

Thank you so much for your reply. I will try that.

2019-07-01 07-16-04
Vinod Patidar

Hi Vishal,

Instead of creating local variable my suggestion would be create a session variable for categoryId. It helps to persist filter value in session.

 If some one click on any product to go on product details page and if he come back on listing page. In this case whatever filter he selected it will persist.

Thanks

Vinod

UserImage.jpg
Vishal Gangwal

Thank you so much for your reply. I will try this.

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