39
Views
8
Comments
Dropdown Option should not display in next dropdown option
Application Type
Reactive

Hi Team,

I have requirement in popup we have  3 dropdown options all 3 dropdown option use same Role list to display options. But my requirement  to filter out the selected option from the dropdown option i.e what ever i select the option from the first dropdown that option should not display  in second dropdown option & same applies for second dropdown option whatever i select in second dropdown option that should not display in third dropdown.

2024-12-10 04-40-04
Gitansh Anand

Hi @Anush Kumar, here is what you can do.

1. Create 2 more list variables of type same as you have in your 1st dropdown.

2. On the OnChange of your 1st dropdown, use list filter on the original list to filter out the selected value and assign the filtered list to the 2nd list created in first step.

3, Similarly, on the OnChange of your 2nd dropdown, use list filter on 2nd list to filter out the selected value and assign the filtered list to the 3rd list created in first step.

Also additionally keep the 2nd and 3rd dropdown disabled until user has selected value in 1st and 2nd dropdown respectively.

Thanks
Gitansh Anand

UserImage.jpg
Anush Kumar

@Gitansh Anand  Thanks for your input

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Anush Kumar ,

You will need two local lists for the second and third dropdowns. To populate these lists, use the OnAfterFetch event of your aggregate.

In the OnChange event of the first dropdown, remove the selected value from the second list. You can achieve this using either ListIndexOf + ListRemove or ListFilter. In your case, ListFilter is recommended since it removes only one value. After filtering, assign the updated list to the one used in the second dropdown.

Similarly, in the OnChange event of the second dropdown, remove the selected value from the third list using ListFilter and update the third dropdown accordingly.

I attached an example OML.

DropdownExamples.oml
2022-12-30 07-28-09
Navneet Garg

Please check solution here. You can simply use listfilter to remove selected values from dropdowns

https://personal-u1aragiz.outsystemscloud.com/MultiDropdownSample/Demo?_ts=638768622166936570


MultiDropdownSample.oml
2026-02-16 05-51-10
Sahana K

Hi @Anush Kumar

1.Dropdown 1
Source List: RoleList
Selected Variable: SelectedRole1
OnChange Event: Refresh Dropdown 2 & 3

2.Dropdown 2
Source List: ListFilter(RoleList, Role -> Role.Id <> SelectedRole1)
Selected Variable: SelectedRole2
OnChange Event: Refresh Dropdown 3

3.Dropdown 3
Source List: ListFilter(RoleList, Role -> Role.Id <> SelectedRole1 AND Role.Id <> SelectedRole2)
Selected Variable: SelectedRole3
Thanks,
sahana

2025-01-31 03-15-38
Irfan Ahamed Abdul Shukoor

Hi @Anush Kumar ,

All you have to do is on the "On change event" of the dropdown you have to filter out the list varaiable, remove the selected list. This has be to done when the DropDown Variable is empty.

If the you have change exisiting selected dropdown value. First you have to add it back to the DropDown List and then filter and remove the current selected dropdown variable.


Thank You.



2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Anush Kumar ,

I would like to offer a completely different solution, where no extra copies of the list are necessary.

See this article.

Dorine

2023-03-24 11-55-45
Pawan Purohit

good article 

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