hughbacca Posted February 18, 2008 Share Posted February 18, 2008 I have a Student_Assessment database that I'm trying to set up. There are several tables that define the courses they can take: course -> assessment -> criteria Where each course has a number of assessments (projects) which each have a number of marking criteria. This works fine. I have a Student database that records all their personal details. What I want to do is this: in the Student database I have created a button to add a student to the Student_Assessment database. This adds the student's name and course number to the Student table in the Student_Assessment database. What I can't figure out is this: I need to then copy the relevant assessments from the assessment table to another table based on the student's course so that the marks that student gets can be entered. I hope this makes sense. Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted February 18, 2008 Share Posted February 18, 2008 Whenever I see someone desiring to copy a batch of information from one table to another when the tables are already linked, I think "design flaw". If the project ("assessment") record is accessible from the "table based on the studen't course", you should not need to copy it at all. It's already in an accessible location. Quote Link to comment Share on other sites More sharing options...
Ender Posted February 18, 2008 Share Posted February 18, 2008 It sounds like you're wanting to create records for a Student-Assessment join. This seems reasonable to me. My suggestion is to store the StudentID in a variable or global field, Find the set of Assessments you want from the Assessment table, then go to the Student-Assessment table and perform an Import from the Assessment table (importing the Assessment IDs). And finally use a Replace Field Contents[] to set the stored StudentID in the newly imported set. Be sure to do some error trapping to make sure the Assessments got imported before continuing with the Replace. Quote Link to comment Share on other sites More sharing options...
hughbacca Posted February 19, 2008 Author Share Posted February 19, 2008 Thanks for that. The main reason for wanting to copy fields is so that I can use a portal - correct me if I'm wrong, but a portal can only show fields from one related table. So if I want to show, for example, a list of the assignments a student has to do (with names of those assignments etc coming from the assignment table) along side the marks that student got in each of those assignments, I would have to have all of that info in one table. My background is in C++/SQL. Filemaker seems to have quite a different way of approaching things. smiley-undecided Quote Link to comment Share on other sites More sharing options...
hughbacca Posted February 19, 2008 Author Share Posted February 19, 2008 Cool. I've got it working! Thanks heaps. One other question though. I have a couple of calculation fields that are summing values from portals. They don't update when the values in the portals change. The portal values are themselves calculated in another layout. Any ideas? Unless I'm missing something really obvious, this seems to be a bug. :confused: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.