How to filter products on a website
Question

Hello

I'm currently doing a jewelry store where I have 3 sections (rings, necklaces and bracelets).

I wanted that when I went to the menu and clicked on the necklaces section it only shows necklaces and not all the products that exist on the site.

How can i make this to happen?

Hello @Ana Andrade 

I implemented it .I share oml.

I Hope it helps!


Thanks

Vaishnavi

Jwellery_Demo.oml

Hello @Anna 

You have to check a condition and apply a filter to your aggregate where 

you have to filter something like  - 

You have to create a 1-to =-may relationship between them like this - 


Product.CategoryId = Category.Id 

you have to first create a filter condition on your aggregate on your product page

when you click on a menu the pass a value from there and compare it with your value in aggregate

You will get your desired result.


Please go through Guided Path we have courses available, it will help you understand this - 

https://www.outsystems.com/training/paths/18/becoming-a-reactive-web-developer/


https://www.outsystems.com/training/paths/2/becoming-a-traditional-web-developer/


this will filter the data

I hope you  this helps.

Thanks



Hello Ana,

Please share your OML.

Thanks & Kind Regards,

Sachin

Here it is 

DiamondStyle.oml

Hi Ana,

You can use this list filter action which will give you the filtered list based on your input.

You just need to pass the source(main) list and the condition by which you need to filter it.

Thanks.

Hello @Ana Andrade 

I implemented it .I share oml.

I Hope it helps!


Thanks

Vaishnavi

Jwellery_Demo.oml

This can be achieved in many ways, but you should show us the structure of the database that you have and the aggregate used to display it, so we could point to the better option.

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