Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

portals and related tables not working properly

Featured Replies

  • Newbies

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.

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...
  • Author
  • Newbies

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?

  • Author
  • Newbies

Oh, and also, when I delete a class from the student's class portal, it deletes that same class from every other student's list.

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.