Reputation: 113
I have generate this screen using Lightswitch. When a team selects a club from the home team Auto Complete Box it populates the home players list with players who play for that club. I also have a Select button (not shown) that will add the selects home player and add it to the match players collection. After that I want to filter the Home players list to not show the players that have been selected.
I just can't work out how to filer the list based on the entire contents of the second list...
Thanks
Upvotes: 0
Views: 104
Reputation: 271
I think there may be a simpler way to achieve what you want. Add a boolean field called Selected to the Home Players collection. When a Home Player is selected to be in the Match Players collection, set that boolean to True. Make sure the Home Players collection has a filter on Selected = False.
You might need to refresh the screen manually. And if you're saving data, you'll also need to think about what happens to the Home Players collection - possibly make sure somewhere in the save pipeline that Selected is always false when saved. But all that sounds a lot easier than filtering a collection based on another one which I'm not even sure is possible without some serious contortions.
Upvotes: 1