Dropdown Tags Reactive web

Hi All,

I am trying to add a dropdown tags to my application to make my end user able to select users who are preferred contact persons. They should be able to select more, hence the dropdown tags. I managed to set up something that will update my datatable and make a user the contact person for a specific file. 

To explain, my application has a big list of files and users can be part of these files (many to many). For each file the team should be able to select their preferred contact person(s) to receive emails and updates etc. I have a mapping table from the files to the users with an attribute called preferredcontact (Boolean type). Once somebody is preferred this will be set to True. This part works as I can see in the data table. 

My problem lies within showing the users where the preferredcontact is True. What I have tried so far is creating a second aggregate that filter users and files on the preferredcontact = true, and use this list as the input for the SelectedItemsList. This shows me all the selected users once the file is opened. I thought this would work but once I want to add another person to the list, it always selects the first user in the list as the value of the CurrentList. This means it is now impossible to add someone. 

This leaves me in the situation where it is possible to add users correctly OR have a list that shows the selected users correctly. 

Does anybody know how to have it both ways? 



PS. I am quiet new to reactive, did not complete all trainings yet but I am wondering if there is a better way of retrieving data if I use a filter or something. Right now I just have a lot of aggregates in the screen which get refreshed if I need them. Most of them are the same but just with some different filtering (like no filtering at all or some value to filter by). I kinda assume there exists a better and cleaner way of doing this. Not really related to the topic but maybe someone can help me out with this as well! 

Rank: #78

Hi Max,

I have some what tried to replicate a rough implementation for the mentioned use-case in a simple way. Please refer the sample attached .oml file. 

Note: For the final implementation, please make sure that you take care of all the warnings  (sorry! I missed it) and also give it a try to optimize the approach/flow/code much better than the shared code.

See this sample app | DropdownTags Demo

Hope this helps you!

Kind regards,

Benjith Sam