I have created two collections for teachers and students. I want the teacher to be able to select current students from a dropdown selection and view their selected students information. Teachers can have multiple students. I already set their relationships.
@infohta are you needing help setting up the drop down menus?
Drop downs look awful in iOS. I had to use a pop up list on a modal in order to get something reasonably acceptable looking. That might not work on a really long list.
So i assume you have a list of teachers which have a multi to multi relations with students as teachers can have many students and students can have many teacher.
make you drop down, list of students > current teacher > students.
That only work assuming that the teacher data is available, are you using teachers as a separate collection or users?
Welcome to the community
I believe all the Teachers and Students are stored in the Users collection and you Identify if that is a student or a teacher from a true/false property? ( True for teachers and false for students or opposite)
Then in the Users collection you can create a Many to Many relationship between the Users collection and the Users collection. ( I believe you already did this )
And for selecting multiple things you can use the Multiselect Dropdown component!
You can connect that to the Users collection and filter it by the true/false property to show only students and add Update actions to add and remove like this. : Multi Select.mp4 - Google Drive
But a issue with this component is once you select the students and close the app and come back again the component doesn’t show if this is selected and for all records the component display unselected.
For this you can make a own one. Not like a drop-down but I believe you can do that too! ( Didn’t try that yet )
You need a custom list connected to the Users collection and filterd by the true/false property to show only students and a toggle inside the list that connected to that Logged in user’s> many to many relationship.
Hope this helps!
I have students as users and teachers as a collection.
I tried to follow along with the video but I don’t understand. Currently I am able to display one student at a time using the dropdown menu but I want to select the student to display. I have the true/false setup for student so I am able to show only students as an option but I can’t get multiselect to display like dropdown.
Are you able to share your app as a clonable app or share a video showing your database,setup, and preview?