92
Views
2
Comments
How to develop the checkboxes list
Question
Application Type
Reactive

I have one requirement ,i have multiples brand after select the brand i want show the products based on that selected brand values.


Screenshot_forums.png
2019-04-02 11-48-16
Martin Rozeboom

What have you tried so far? Do you have any .oml or something for us to check?

2023-10-21 19-42-11
Tousif Khan
Champion

Hello @Chennamsetty Anil 

Yes we can achieve this, As I have checked your screenshot we are trying to filter here based on the selection of the checkboxes.

From the Image what I understand is there are brands and basis on the brands there are products

So 1 brand can have many products.

I have created a same scenario like this with Category and Product for you

  • The first thing we need to do is to create  a 1 - many relationship between Product and Category.(In your case product and brand)

          

  • Now we have some records added.
  • Now I have added one list on a screen that is bind to a category and I have added one calculated attribute to it which is bind to a checkbox which will give us the result of the selected checkbox.
  • Now we will add a table which has records which is bind to a product table.
  • Now Create a local variable of type text, This will hold all the ID'd that we select from the list of checkboxes.
  • I have added a On change action on selection of a checkbox that contains the logic of selection of ID's.
  • Now  we need to filter the result basis on the selection, since we can have multiple selection so we will use Index function here- 
  • If(StringOfIds ="",True,(Index(StringOfIds, "#" + Product.ProductCategoryId + "#") >=0))
  • Now in just refresh the aggregate

I am adding a sample for you that will help you with this-

https://personal-ejuytnht.outsystemscloud.com/TestAppForm/ProductsBasedOnCategory

I hope this will help you with this.

Best Regards
Tousif Khan

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