Hello Bubble Community, I’m Kojo from Ghana and new to Bubble and I’m using it presently to work on student management for an examination web application. I’ve got a sorting-ish problem and would appreciate any help.
I want to be able to query my database to show all Users that are Enrolled in a specific subject and show the result in a group, repeating group or some visible element.
Details are as follows:
I have 3 tables detailed below (PK-Primary Key, FK-Foreign Key) :
User - UserID (PK) , First Name, Last Name, Email
Subject - SubjectID (PK) , Subject Name
Enrol - EnrolID (PK) , Subject ID (FK) , UserID (FK)
User and Subject tables stores students and subject info respectively.
The Enrol table stores only the the subject id and student id of the User and Subjects table.
This is so that one student can enrol in multiple subjects/courses.
The Enrol table is basically a composite entity for the User and Subject Tables
I want to be able to query my database to show all Users that are Enrolled in a specific subject and show the result in a group, repeating group or some visible element.
For example, I’d like to see all students presently taking Mathematics in a visible element. I can’t quite figure it out so far and would appreciate some help.
So far I’ve created a dropdown that shows the unique subjects. I made the dropdown choices dynamic, set the type of choice as text, and choices source as do a search for enrollments’s subject’s subject name:unique elements
This (I suppose) allows me to retrieve the unique subjects in the enrol table.
I would like the User to be able to click on the text option in the drop down and see all unique students taking that subject in a group, repeating group or visible element.
Can someone please guide me on how to go about this? (I’ve read that Bubble doesn’t presently support sorting by foreign keys) but i think this use case is a bit different. Any help would be appreciated. Thanks in advance.