How is your experience with the OutSystems Community?
24
Views
4
Comments
Solved
Retain Selected Values in Multi-Select Dropdown After Reopening Popup
Application Type
Reactive

Hi All, I have a multi-select dropdown inside a popup.

 After selecting values and saving, the selected items are displayed outside the popup. When I click Add New again and reopen the popup,

 I need the previously selected values to remain selected in the multi-select dropdown, as shown in the attached example (OML). How can I achieve this behavior?

URL : DropdownSerarch




Dropdown.oml
2026-05-21 04-48-12
Deepa Tiwari
Solution

Hi @maged shokry ,

Just pass the input parameter SelectedOptionList2 as the initial/starting selection.

Also, the issue mentioned in the URL you shared has already been resolved.

2018-06-19 20-44-56
Raul Gustavo Lopes de Sá
Solution

Hi,

You just need to use the list you already get from the Aggregate and pass it to the Dropdown Search StartingSelection when opening the popup.

If the Aggregate returns your previously saved values, map that result to the structure expected by the Dropdown and use that mapped list in StartingSelection.

So the flow is:

Aggregate result → Map to Dropdown Options → StartingSelection → Open Popup

This way, every time the popup opens, the Dropdown will already show the previously saved items as selected.

Just make sure the Value used in StartingSelection is the same Value used in the Dropdown OptionsList.

2026-05-21 04-48-12
Deepa Tiwari
Solution

Hi @maged shokry ,

Just pass the input parameter SelectedOptionList2 as the initial/starting selection.

Also, the issue mentioned in the URL you shared has already been resolved.

2024-07-12 05-57-50
Gourav Shrivastava
Champion

Hello @maged shokry 

As mentioned above, you just need to pass your selected values in the starting selection 

I am attaching your OML; by adding this, you can check

https://personal-l9q0mrdp.outsystemscloud.com/Dropdown/DropdownSerarch

You can also use this DropdownSetValue client Action by adding the dropdown ID to set values in the dropdown (it works on both dropdown tag and search)

DropdownSolution.oml
2025-12-16 08-44-55
Denilson Custodio

Create a Data Action that returns the pre-selected values, with an output variable of type DropdownOption List. Populate the list as follows:

  • DropdownOption.Value → the User Id 
  • DropdownOption.Label → the User Name 

Then, wrap the Dropdown widget in an If condition and check whether the Data Action has already executed (YourDataAction.IsDataFetched). This ensures that the Dropdown is only rendered after the query has completed. You can then pass the Data Action output to the widget’s StartSelection. 

One important caveat: avoid using the same variable for both StartSelection and the newly selected values. Doing so can cause the Dropdown to close unexpectedly when you open it and select an option.

Instead, I recommend handling the initialization through the widget’s InInitialize event. Inside the event handler, use the DropdownSetValue action, set the Id to the Dropdown’s Id, and pass the values returned by your query to SelectedValues.

This way, you initialize the Dropdown cleanly without interfering with its subsequent selection behavior :P 

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