Hi, I'm new here, and I have a question about how to use the dropdown as a filter.
I managed to write the data to the table without problems, now I need to filter the listgroup by dropdown.
Can you help me?
Thanks
Hello Wagner,What you can do here is , Create a local variable with data type identifier( which you are using in your dropdown),Bind the same local variable with your dropdown.
Then create a on change action on your dropdown, and on a action flow Refresh the Aggregate that is bind to your record list.Add a Filter to your Aggregate,
your local variable = Nullidentifier() or identifier of dropdown table] = your local variableBelow are the attached sample picture for your reference
Dropdown-
Filter to use in aggregate-
On change action flow-
I hope this will help you
Hi Wagner,
Welcome to the OutSystems community!
First of all, you should have a variable to bind to the dropdown and hold the value selected by the user. It should be an identifier of the list of values you are displaying in the dropdown.Take a look at the example below where my dropdown shows a list of activity status and therefore the variable bound to the dropdown is an ActivityStatus identifier:
Now we just need to filter our list by the selected value in the dropdown. In my example, I am going to have a list of activities and I will filter the query of activities by the status selected using the ActivityStatusId variable.
Notice that my clause won't filter anything if the ActivityStatusId is null. This represents the situation where no value is selected from the dropdown and therefore no filter will be applied to the list.
Kind Regards,João