I was struggling to work out how I store as JSON, and then display - so I tried this - I’d appreciate your thoughts on whether it’s crazy, and if so any advice/links on where I can follow how to implement the JSON solution?
I have the ‘club’ id in the URL as a parameter. In plain English, I want to display people that play for the club at present.
Whether that means I display Memberships, Sport Profiles or Persons - I’m not 100% sure. It seems like it’s Sport Profiles, so this is what I’ve attempted:
Sport Profiles where role = player (easy)
…and there is a membership on the profile that
…has a club that = the club id in my parameter,
And now where I’m stuck is… - that membership has a status of approved, and does not have an end_date (stuck)’
I tried this, but I just want to end the condition where it is - it won’t let me
But now you’ve introduced Sport Profile in your last reply so I’m lost.
I’m confident after moving forward with your last reply that my Repeating Group needs to show a list of Sport Profiles (what you have called Memberships in your diagram).
This will allow me to access:
Player information specific to a sport and club (e.g. positions), by going Sport Profile’s preferred_position.
Person information, by going Sport Profile’s Persons’ first_name
How do I retrieve a list of Sport Profiles, where Group = the ID in my URL, and role=player, status=approved and so on…?
Yes, so you have two many-many relationships between person and group.
membership is the main one - you were a player at Club A between 1/1/2000 and 1/12/2020 etc
sport profile / membership profile (sorry I may have mixed my table names) is effectively another many-to-many between the person and the group but is also a one to many from membership.
you were a player at Club A between 1/1/2000 and 1/12/2020 and you played hooker and prop.