How to set up two dropdowns within one entity path and selecting different players?
Hi all, I'm working on a Mendix table tennis app for our office. One of my entities is Matches. When I create a new match, I want to select one of the players from the database ('’Player name'’ in the entity: Players). I have tried multiple things but I can't get it done. Current settings: When I open the app now, I can select a player 1 and if i'm filling in Brian, player 2 is automatically filled in with Brian as well. My domain model looks like this: I understand that I'm using the same entity path, but is there a way that I can use players from the same entity path but select different players? At the end, I want to create a ranking table with player stats with only one playername. When I create a seperate Player name 1 and Player name 2, i'ts not possible to have accurate player stats because players have not only 1 playername, but can have Player name 1 and Player name. I'm hoping that somebody can help me! Thanks already
Patrick van der Spoel
You could create 2 associations between Matches and Players e.g. Matches_PlayersHome and Matches_PlayersAway. You can now use a reference selector for each association.
If you do so, you won't need the playersnames in the Matches entity anymore.
Right now you are using the same association ‘Matches_Players/Player/Playername’ for both names, while also having only a 1-* association between players and matches. This mean that you are only able to set 1 player per match. That’s why when you select Brian, the other player will be filled with Brian as well.