I have a case where Athletes need to be related to Coaches. Both athletes and coaches are stored in the same table which I have named Users. I have created a second table with AthelteID and CoachID called tbl_coach_athlete_relationship so that I can have a many-many relationship and linked both to the Users table. This works and I can add the relationships.
I now need to be able to allow the athletes to select more coaches via the UI. I have done this by creating a submission for for thetbl_coach_athlete_relationshipwhich works but it is not ideal because it allows the athlete to select the same coach many times and it is also not very easy to search.
Ideally I would like a tabular report which the user can use to search only the coaches not already assigned to them.
I have managed to do this partly by creating a view including all the records from the user table with type coach and records from thetbl_coach_athlete_relationshipwhere there is a relationship. Then in the tabular view I added a filter where athleteID is not equal to the logged in user. That gives me the results in the tabular view that I need but I am stuck trying to find a way to allow the user to select a new coach and update thetbl_coach_athlete_relationship table.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
BrianI
Hi
I have a case where Athletes need to be related to Coaches. Both athletes and coaches are stored in the same table which I have named Users. I have created a second table with AthelteID and CoachID called tbl_coach_athlete_relationship so that I can have a many-many relationship and linked both to the Users table. This works and I can add the relationships.
I now need to be able to allow the athletes to select more coaches via the UI. I have done this by creating a submission for for the tbl_coach_athlete_relationship which works but it is not ideal because it allows the athlete to select the same coach many times and it is also not very easy to search.
Ideally I would like a tabular report which the user can use to search only the coaches not already assigned to them.
I have managed to do this partly by creating a view including all the records from the user table with type coach and records from the tbl_coach_athlete_relationship where there is a relationship. Then in the tabular view I added a filter where athleteID is not equal to the logged in user. That gives me the results in the tabular view that I need but I am stuck trying to find a way to allow the user to select a new coach and update the tbl_coach_athlete_relationship table.
Thanks for any ideas.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.