I'm currently trying to build a small lacrosse community based on Commons 3.x. The idea is that there are multiple teams and leagues that all form a community as the players do not change much from league to league. So I want to create two types of groups. Team groups and League groups. Team groups with give players a place to converse over team matters. The league groups will be all inclusive and be the place where individual leagues will be created with related teams, players and games.
It all sounds good but I'm running into an gray area where I know it's possible in drupal 7, but haven't had to do this yet. What I am looking to achieve is how to create a relationship like so:
League Group > League Season (group content) > League Team (group content) > Players (users not already added to other League Teams)
That last part is what is eluding me. Within the League Team (group content) I am trying to add an entity reference to users that uses autocomplete. That part is easy, but how do I make sure that when I add multiple players, users already referenced to not show up again in the autocomplete?
If a player is selected in the same League Team type and I want to add another player, I click the Add Item button, get a new autocomplete field, and begin typing a new player. I do not want players that are either already associated with another League Team in the same League or already associated with the League Team being created.
Does anyone know how to make autocomplete filter out results already referenced by the same or other League Team types?