Jump to content
Barry K

Many to many problem - im stuck

Recommended Posts

Barry K    0

I have a group of students in my class that are all working on different subjects. Each student has unique key id field as so and each student has a subject they are taking which is another field. What I am trying to do is see which subjects each student has not taken yet. So if the key id has records for (history and math) but not reading, I need to have a new field that tells me that I need to have the student take reading next. I bet this could be done via a script but I just do not have the FMP skills to build the script to do this. If possible I would like the script to be able to output as a spreadsheet the key id and the subject missing for each key id. 

I have attached the filemaker file as well as a screen shot of the problem. 58a5fb9ed3cc9_ScreenShot2017-02-16at11_20_41AM.png.4e449943861bbedba795f77ac4b5a7e6.png

Any help would be great, thanks for reading this. 

 

students.fp7

Edited by Barry K

Share this post


Link to post
Share on other sites
comment    1,392

Your title is misleading, because what you really have is a many-to-many relationship between Students and Subjects. And the table that you have is not a table of Students (where each student would have a unique record), but a table of enrollments where each record represents one student taking one subject.

To track this correctly, you should have three tables: Students, Subjects and a join table of Enrollments (which you already have).

 

54 minutes ago, Barry K said:

What I am trying to do is see which subjects each student has not taken yet.

In what form do you need to see this? You could show this in a portal placed on a layout of the Students table (which you would browse one student at a time). If you need to export this as a list that includes all students, then this will be more complicated, because you do not have a record for each subject a student has not taken - and it's difficult to export something you do not have.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Who Viewed the Topic

    2 members have viewed this topic:
    temp007  ericire 
×

Important Information

By using this site, you agree to our Terms of Use.