Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

portals and related tables not working properly


This topic is 7092 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have three tables, *Students, *Classes, and *Families. *Students and *Classes have related fields (~First Name, ~Last Name, ~Class Name). I need to have two+ layouts set up with portals on both layouts that contain this information. IE - on the ^Class layout, I need to have a portal that shows the ~First Name and ~Last Name of the students taking the class. For the ^Student layout, I need to have a portal that shows what classes (~Class Name) the student is taking.

I have spent hours trying to figure out why I can't get this to work...The portals are acting strange (like when I type in a ~Class Name, "Science", and hit tab or enter to go to the next line in the portal, it automatically enters two Science lines. And if I delete a ~Class Name from the portal on the students page, it deletes the ~Class Name record on the classes page. Crazy?

Could someone please explain to me how to set this up? I know it's simple.

Posted

The relations between students and classes is presumably many-many and you will need a join table which contains the information of which students are in which classes. Your portals need to point to a join table. So each record that you add to the portal, for example Science to Albert Einstein, creates a new record in the Join stating that Albert Einstein is in the Science class. Then the Class portal will show this information and also allow you to add records to the join table via adding student names to the class list.

Do a search for many-many relationships to get more info on this.

  • 2 weeks later...
  • Newbies
Posted

Okay, I kind of figured out the problem. When I type in the class name in the portal however, and go to the next line, and type in another, it overrides what I type in and just duplicates the first class entered. It also creates a duplicate class record in the Classes table. So now I have student Johnny Smith taking Math twice, and the school offering two Math courses.

Solution?

Posted

I agree with SlimJim that you have a many to many relationship between Student and Class. I strongly suggest that you add serial number fields to each of your tables and use those for you key fields. We need to see your file to determine what is happening. Your structure is what is causing you to delete classes for all student.

I am attaching a sample file that demos the setup for a many to many relationship. Be sure to read the developer notes.

This topic is 7092 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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