How do you use the output of a DropdownTags widget to filter your table?
Question
Application Type
Reactive
Platform Version
11.12.1 (Build 30548)

In Outsystems Reactive, I'm making a webshop where you can order clothing. When you enter the page a list of all the products appear. You can already filter the list on category and price. Now I want to add the option to filter on size using a DropdownTags widget for the input, so you can filter on multiple sizes. 

In the aggregate which fetches the products I want to add the filter for the multiple selected sizes. How do I implement this as you can only choose basic datatypes and not a list of chosen sizes. In other words how do I filter an aggregate using the output of a DropdownTags when multiple sizes are selected? I already checked the DropDownTagsDemo. I cannot implement it in the same way as I want the be able to filter on category and prize as well.  

For more information: Size is a static entity with the label as identifying component. 


mvp_badge
MVP
Solution

Hi Ana,

Filtering aggregate with a list is something like IN clause in SQL queries which is still not available in outsystems but there is another way to implement this in your application.

Using the list of selected items in the dropdown tags you can create a comma separated list of ids (identifier of your size static entity) and then using these comma separated ids you can add filter in your aggregate like this 

Index(FilterSizes, "," + ProductSize.SideId + ",") >= 0

Here FilterSizes is the comma separated size ids and please make sure that your comma separated ids have comma at the end and beginning also of the string also to make above condition work as expected.

Hi Anna Voskuilen,

Added to @Nikhil Gaur suggested

I have attached the  sample application, URL is here

Regards,

Ellakkiya.S

reactivewebapp.oml

Thank you @Nikhil Gaur for the answer and @Ellakkiya S for the clear example. I think it works now :-) 

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