How to Implement a Dropdown Search Filter While Fetching Data From DB
So I have floor numbers to be shown in the dropdown (entity Building has an attribute "FloorNumber").
Then I have a table for my buildings that I have to filter based on that result.
In the documentation, there are 2 solutions. I've seen some forum questions, but it seems it doesn't quite answer them, and I haven't completely understood the difference between the two in the documentation options or the step-by-step.
The videos available are for the widget, but do not implement it the same way.
Sorry for the question.
Hi @Mafalda Melo Oliveira.
Why don't you use the native component Dropdown Server Side for that?
Regards,
Gabriel.
https://success.outsystems.com/documentation/how_to_guides/front_end/how_to_use_the_dropdown_search_to_filter_an_aggregate_with_a_single_attribute/
based on this, but having records not repeated.. cant have the output list as here.. dont want repeated records
Hi @Mafalda Melo Oliveira
Could you share a sample oml with your attempts and explain your difficulties?The component simply receives a list so is pretty straightforward.You can also that a look at the OutSystems UI Style Guide Preview to look at an example.Hope it helps.
Cheers,GM
Think about how you want to display the floors in the dropdown: you may need to create a database query to fetch the unique floor numbers. Then use the data you receive to populate the drop-down list on your form. You can then configure the building table to be filtered based on the selected floor number. It is important to ensure that the data in your dropdown list and building table matches and updates correctly.
Hello, Mafalda
I am sending you step by step process ,how to use Dropdown Search
Step-1
You need to bind Dropdown search by Aggregates list in which floor number will show how to bind for that i am sharing one of image
Step 2- In value provide -attribute- Id
Label - Attribute Name
Prompt -what you want to show
Step 3- Create Handler of this dropdown By default selectedoptionList input created in handler input you should copy it on screen and convert into Local Variable
after that assign value of input parameter to local variable and refresh your aggregate through which you bind your table for that i am sharing image
And how your local variable look like
Step 4- Use filter in your aggregate with the help of local variable -
Step 5- Finally your dropdown will look like
If you have any problem regarding this you may ask