29
Views
3
Comments
Solved
Duplicate names can't be remove in dropdown search widget
Application Type
Reactive

Hi,

This is in connection to a previous question i had asked, which had been solved already. I am trying to add more checks to the logic.

There are 2 aggregates in the 'DropdownSearch' screen

  • GetCustomers - Used to populate the Team Leader DropdownSearch
  • GetCustomersAsMember - Used to populate the team members list. There is a filter in the aggregate, which will filter out the team leader, so that it will not be shown in the members list

Now, I am trying to implement the checks TeamMembersSearchOnChanged action that, duplicate team members cannot be selected. However, I am having trouble doing it in a neat and tidy way.

1. When i assigned "" to SelectedOptionList.CurrentValue, it doesn't work. The value is still being displayed on the screen

2. Had tried adding a local variable 'IsDuplicate', however, i think it's a bad idea. As i will have to perform more checks in other action and having to set the value to 'False'

3. Had tried to add the check in GetCustomersAsMember aggregate. However, I couldn't do a forEach check in my team member list.

4. When viewing my oml, just take note that i had accidentally click on 'Remove Unused Dependancies'. So there will be quite a bit of actions missing. 


Can anybody advise or comment, what am i missing or doing wrongly here?

Thank you.


SandBox.oml
UserImage.jpg
Neha Bhimsaria
Solution

Hello jun, 

You can also modify the condition of the visible property which I have set in the Dropdownsearch container as below highlighted.  Due to equal to (=) it was going till 5. 

or if you have found the workaround that's also great.

And if this solves your problem, please mark the answer as solution for other members to find it easily. 

Thank you 

Neha Agarwal

UserImage.jpg
Neha Bhimsaria

Hello Jun, 

I have made changes to your OML, basically you have to change the UI part because we cannot use the list to show in dropdown and in value we have to use different list for both the purposes.

Take a look at the OML, let me know if any doubt. 

I hope it will solve your issue. 

Thank you

Neha

SandBox (1).oml
2022-05-01 03-47-53
Jun Mun Chan

Hi Neha,

It can solve the issue of duplicate team members, but to limit the number of team members to 4 has got some bug in it.


I guess maybe DropDownSearch do have some restrictions, and this method is a work around

UserImage.jpg
Neha Bhimsaria
Solution

Hello jun, 

You can also modify the condition of the visible property which I have set in the Dropdownsearch container as below highlighted.  Due to equal to (=) it was going till 5. 

or if you have found the workaround that's also great.

And if this solves your problem, please mark the answer as solution for other members to find it easily. 

Thank you 

Neha Agarwal

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