Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Copying multiple related records


hughbacca

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.



×
×
  • Create New...

Important Information

Terms of Use