Hit a bit of a wall over the past couple of days. I am setting up an app for coaches to manage their students.
The users data type is the coaches and I have set up a student data type. I have successfully inputted two coaches and eight students (4 when each coach was logged in).
In the users data type I have a field called students and it’s field type is Student. In the Student data type I have a field called coach and its field type is user.
I have two issues I can’t over come:
First I am trying to produce a repeating group which shows all the players and their respective coach.
Second, I want the logged in coach, only to see the students pertaining to them (not a full list of students). Thought this would have been in the privacy setting up can’t seem to set it up there.
I will be grateful if someone could take the time to answer this or point me in the direction of a tutorial.
Cheers
Graham
Have a ‘user’ data type only for the purposes of allowing people to sign up / login of the app.
Have a coach data type
Have a student data type
In both the coach and student data type have a data field that is of type user — so you can link the user to their own coach or student data type dependent on what they are
In the coach data type have a data field that is set to be of type student and make it a list — this keeps the list of all students for that coach
In the student data type have a data field that is set to be of type coach — this keeps the coach of that student related to the specific student
Then you can have a repeating group of type student with do a search for student. In the repeating group cell place a text element and set it to current student’s coach to show their coach
When a coach is logged in and you create a repeating group to show only their students make the repeating group of type student and the datasource is ‘this coach’s student list’
You will also need to make a way to connect the ‘User’ data type to that of a student or coach…you could simply put a data field of ‘is coach’ make it a yes/no so that all coaches have value of yes and all students have a value of no in that field.
Thank you, I will give it a go.