Filtering options in RelationManager
I have four Resources:
GameMatch, Event, Player, Team
I have a RelationManager inside the GameMatch resource, for Events. It's successfully working.
I have a Select for player_id, when creating a new event on that modal, but it shows all the players of the database. My wish would be to show only the players with a team_id equal to home_team_id or away_team_id from the GameMatch.
The code I conjured up is the following:
However I'm receiving a Invalid parameter number, although the query that's displayed on that dialog produces the right results when querying the database. I'm sure I'm doing something wrong but can't figure out what. Thanks for any help.
Solution:Jump to solution
In the end, I figured it out. GameMatch was getting me a collection, and not a contextualized GameMatch. Got there doing it like this:
...
1 Reply
Solution
In the end, I figured it out. GameMatch was getting me a collection, and not a contextualized GameMatch. Got there doing it like this: