Jump to content
Sign in to follow this  
Himitsu

trigger

Recommended Posts

I know this has been covered somewhere, but I can't seem to find it. I have a field that is called Homework. I set it to a check box with all the homework that we have. So if this student bought homework 1, 2, 3, then I would check the box. But this student A has a brother, which has another fild called "family". Well, mothers don't want to buy two sets of the same homework for their kids. So, I am trying (unsuccefully) to have a lookup, I should say a refresh, that will show the homework that other family members have bought. I have a relationship from "family" to "studentID" fields and I have set the the "homework" feild to do a lookup using that relationship. It is ok, but I have to click on the family member to have it refresh. So if student A bought hmk1,2,3 then when I go to student B, who is a sister for Student A, I need it to reflect what Student A has. I tried to make a relationship using the homework field with itself, but that kind of gummed things up. Any help would be super, super, super GREAT!

Share this post


Link to post
Share on other sites

Hmmmm... this may overshoot your mark a little, but i think it's a good structure if you ever need to expand your needs:

Make a separate table called Family and relate Student to it (maybe you've already done this). Now don't think of students as buying homeworks, think of families as buying homeworks instead. Relate your Homework table to Family, and you will be able to see what family a student is in and whether or not that family has bought a particular homework.

Jerry

Share this post


Link to post
Share on other sites

In a sense I have done this. But without the seperate table. On each record there are fields, studentID, name, familyID, name but I put down another set of family fields. I know this is redundant, but at the time I was still in diapers and drolling all over the place... that idea is a great idea, I will start implementing that soon but as of now, with each record basically being a family set too, could I see the updates from one student to the next with a relationship from familyID to studentID???

Share this post


Link to post
Share on other sites

Not to be pedantic, but if you have the family name in the same field, you haven't done the same thing--even if it behaves the same right now. Say you have brother & sister Johnny & Janie Suzuki, and you each identified as Suzuki family. Since there are two records for the students, you now have two records for the Suzuki family, and if you mark one of those families as having bought homework A, the other family doesn't necessarily show that. You're better off, for many reasons, having separate tables for Students and Families.

You could just duplicate your Student table, call it Family, remove all fields specific to students (First Name, Age, etc.), and delete all records that show duplicate family names. Of course, since there may be two different Suzuki families, you'll need to make some sort of unique ID; the best practice is to have a serial number for the family, but there are several ways of generating a unique identifier.

Now, using related fields, you can have on one layout:

First Name

Family::Last Name

Family::Address

Family::Homeworks Purchased

And when you change Johnny Suzuki's address in this record, Janie Suzuki's address is automatically changed as well (since that is a field in the Family record, not in the Student record).

Share this post


Link to post
Share on other sites

I understand how that would help out a lot... however, I am still in an FMP6 mind. I can't see how I can have John and Jane listed on that family record in the family table without some kind of line-items table. Or should I just put multiple fields ie, kid01, kid02 kid03, ect... and have it look up that way? It would be nice to have some kind of line-items set up there for I could use a portal and it would show all the family members that kid has and if the family added, lets say the father, to our students, ie. joins our school, then all we would have to do is add him to a portal from the family table to the lineitems table and then it would show on the students table? or is this getting to complicated?

Share this post


Link to post
Share on other sites

You would want a portal in the family file, showing related student records. They would be related by Family::Family ID--Student::Family ID.

There are many ways families can be represented in databases. You can check out the Relational Database Theory forum for a discussion about this.

Regarding your original question, how to combine homework for many chidren: You should make sure this is desirable. In a normal school solution, homework would be assigned and tracked for each Student-Class. Even if two students in one family have the same homework assignment, you would want them shown separately. It sounds like maybe your solution is not for a typical school situation, so maybe this isn't important.

Share this post


Link to post
Share on other sites

I guess what I am really asking is how to make one field relate to itself through a relationship between two other fields. Example, Student table has has three fields. 1. student_id, 2. homework, 3. family_member and family_member has a pop-up list that is pulling from a field, student_id. So, in the homework field, if I click on two different homeworks they bought, I would like it to go through the relationship of family_member to student id and update that field. Is that possible?

Share this post


Link to post
Share on other sites

It is possible, but much more difficult than just making a separate table (or file) for Family.

Piggybacking on Ender's last comment: If what you really want say is that a family owns a homework (i imagine you scenario is that a family can buy a workbook which can then be used by any child in the family), you should structure it as such in your database. But if a homework is an assignment, for example, and is specific to each student, you should record that info in the Students table.

Take a look at the attached to see if this scenario is useful to you (Windows, FM6).

Share this post


Link to post
Share on other sites

QuinTech, I like it and that is, in a sense, good. But hard to add two records for one student. Already I have created eight files to run this thing. There is so much to enter in when a student joins. I think my staff members would strike if I made them enter two records, usually only one family member joins, for each student. I think there might be away in a script that might auto update a field, kind of like a re-entry, that would, in a sense, re-lookup the value in the homework field. I will toy with it and see. But thanks for the input.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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