46
Views
7
Comments
Dropdown filtering based on local variable
Question

I need to make  a dropdown from a local variable, and from that data I need to make a filter based on a chosen value. For example, from a record from the dropdown, the price will appear based on the chosen record, and all happens locally.


I know how to do it globally with filtering and refreshing from aggregate, but I need to do it locally. Perhaps someone knows how to?


2022-12-22 10-00-39
Beatriz Sabino

Hi shaped clouds,

Could you provide a bit more context on what you're trying to achieve? When you mention "creating a dropdown from a local variable," do you mean that the list you're trying to filter is a local list rather than an aggregate?

If that's the case, you can use the ListFilter action to filter your local list based on the selected item from the dropdown. Just use a condition like LocalList.ProductId = SelectedProductId to match the relevant records.

2026-03-12 10-32-06
Wahaj Adil

Hi @shaped clouds , hope you’re doing well.

In order to achieve this all locally, first of all you need to prepare the your local data.

Create a local variable as LocalList of type List of Product, with attributes for eg; id name and price respectively.

Create one more local variable to store the chosen value, eg; SelectedProductId (type : identifier)

For the dropdown widget

Source should be - LocalList, Text- Name, Value-Id and Variable - SelectedProductId.

Create an expression using the ListFilter function to display the selected value.


You can also use a Listfilter Action on the OnChange event to find the Selected Product details (price)


Hope this helps.


thanks and regards!



2025-03-12 07-08-15
Nilesh Trivedi

hi,

You can refer to the forum discussion. Hope it helps.

https://www.outsystems.com/forums/discussion/83163/use-dropdownsearch-to-filter-a-list/

Thank u.

2023-09-07 20-35-56
Pawan Parmar

Hi @shaped clouds 

I created a OML refer it

FBS_DropDown1.oml
2025-04-14 11-22-14
Aditi Saraswat

Hi @shaped clouds,

You can do this by applying a list filter when the dropdown value changes.

I am attaching a OML let me know if you face while implementing.

Hope this heps

Thanks


DropdownTestNew.oml
2026-02-26 06-29-24
Rahul
 
MVP

@shaped clouds ,

I would suggest use Dropdown search and Show Item and Price together no need to search by locally.

Also you can set (expression) in same drop down -while use custom type, and shoe both item and price together.


Hope this will help you.


2025-02-10 08-07-05
Sudha Narayanan

Hi @shaped clouds ,

Refer this OML,I hope it will helpful to you.

Thanks,

@Sudha Narayanan 

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