34
Views
9
Comments
Solved
[OutSystems UI] I want to keep Dropdown Tags when going between screens
outsystems-ui
Reactive icon
Forge asset by OutSystems
Service Studio Version
11.54.78 (Build 63596)

I have an app, in which the user should be able to select between a list of systems to "subscribe" to, in which I am trying to use the DropdownTags widget to keep track of it. When the user select a system it is succesfully added to a entity, so I can keep track of the selection across screens. But if they are to navigate away from that page, the visual part of the DropdownTags widget is cleared. I can add the entries from the entity back into the SelectedOptionList in the widget, but they don't show up visually. How do I save the state of the widget, so it shows the selection they had when returning to the screen?

I hope this makes sense - Suggestions for alternatives are also very welcome

2024-09-09 08-44-46
BHUPENDRA SINGH
Solution

Hi Mbh,

Please check the attached .oml for your use case using Client Variable to store selected Ids and "Starting Selection" property of Dropdown Tags to show the selected options.

Hope this helps.

DropdownTags.oml
UserImage.jpg
Mbh

I had completely overlooked the StartingSelection property! Thank you for the example :)

2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @Mbh,

As per my understanding, store your drop down value into client variable. When we will move one screen to another screen only client variable value remains till we not logout from there.

Or if possible please share OML.



Hope this will help you!!


Regards,

Rajat

UserImage.jpg
Mbh

Thanks for the reply,

I am sadly not able to share the OML - but if I were to select multiple items in the dropdown menu, I will not be able to save it to just a singular client variable? 

But the issue lies more in the visual part rather than the actual data saving. If I append the saved entries back into the list within the DropdownTag widget, those selections are removed from the list of options to choose, but not visually displayed. And by visually displayed I mean as in the image provided here

2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @Mbh,

Client variable data type should be text.

In that client variable save your dropdown value with comma separated by using String join server action that is inbuilt action of outsystem.

And when you want to get this value in next screen so you can use string spilt action to show that is also outsystem inbuilt action.


Regards,

Rajat



2024-10-19 11-15-19
Sazid

I believe the issue may be with the dropdown variable. What variable are you binding this dropdown list to? It seems like you're using a static entity to read the list of DropdownTags and storing the dropdown tag identifier (or subscription identifier) in another entity. To resolve this, you should bind the dropdown variable to the location where you're actually storing the selections, rather than directly from the static entity. 

2024-09-09 08-44-46
BHUPENDRA SINGH
Solution

Hi Mbh,

Please check the attached .oml for your use case using Client Variable to store selected Ids and "Starting Selection" property of Dropdown Tags to show the selected options.

Hope this helps.

DropdownTags.oml
UserImage.jpg
Mbh

I had completely overlooked the StartingSelection property! Thank you for the example :)

2024-09-09 08-44-46
BHUPENDRA SINGH

hi Mbh,

Also please check demo link as below:

DropdownTags

2024-10-12 12-11-20
Kerollos Adel
Champion
DropdownTagswhengoingbetweenscreens.oml
UserImage.jpg
Mbh

@Kerollos Adel @BHUPENDRA SINGH @Sazid @Rajat Agrawal 

Thanks for the detailed replies and examples, I will try them out as soon as possible!

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