Hey everyone,
I’m putting together a data platform on Glide Pages that a school can use to manage information about students, parents, emergency contacts etc and seem to have hit a snag when it comes to adding information using a form.
I input the existing mock data in the Google Sheet(but I have also tested using only data that is input by the form and run into the same issue)
Data structure and relationships
Students are at the centre of the app.
Parents → Each student can have one or more parents. Similarly, a parent can have one or more students.
Emergency contact → Each student has one or more emergency contact. Similarly, a student can have one or more students.
For existing data
In the Student table, I am using arrays for Parent names(Parent 1 and Parent 2) and similarly, Emergency Contact Information(Emergency Contact 1 and Emergency Contact 2)
These arrays are then used for a relation to the Parent and Emergency tables respectively.
For data added through the form e.g Adding a Parent or Emergency Contact on the Student Details screen
The Student Row ID is being passed as a column value and later used for a relation in the Students table. This relation is then used as a source of data for a Collection.
Issue: Adding an additional student to a parent or emergency contact through their respective details screen.
Is the only way to set up another collection within the student details screen e.g by setting up a relation using one of the column values?
I want to be able to from the Parents Details or Emergency Contacts screen add another Student. (Because a parent can have multiple students at a school and I want to limit the chances of having duplicate records)
Additionally, for any students who have more than one parent, I then want to be able to see any students under Parent 1 show up as students under Parent 2.
I think I may have set up the relationships in my data incorrectly but would really appreciate any ideas.
Link to the app: https://ariel-academy-ua1h.glide.page