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.

Join tables many to many- fun fun

Featured Replies

hola!

I've got a many to many working with a join table.

Peeps

ID

name

jointable

PeepsID

ClassID

table3

ID

classname

I have it working so that when I am viewing a Person, I can see what classes they are a part of.

And when I am viewing the Classes, I can see what Peeps are in which class.

However, I can not figure out how to show what Peeps are in the same class while viewing a Person record.

IE, if I am viewing Fred's record, I can see what classes he's in, but, I would also like to see who his classmates are as well at the same time under Fred's record.

I think I have to create a TO of the Peeps table, but not sure where to go from there.

thanks for any insight! :

That is not a very clear request: when you are viewing Fred's record, you can see what classes Fred is taking. Suppose these are Algebra, Biology and Chemistry. Now which classmates of Fred do you want to see? His classmates from Algebra? Or his classmates from Biology? Or perhaps all of his classmates, regardless of class? Or only those that take the same three classes?

  • Author

That is not a very clear request: when you are viewing Fred's record, you can see what classes Fred is taking. Suppose these are Algebra, Biology and Chemistry. Now which classmates of Fred do you want to see? His classmates from Algebra? Or his classmates from Biology? Or perhaps all of his classmates, regardless of class? Or only those that take the same three classes?

Very good question, and the simple one is all scenarios!

I'd like it to be versatile enough to handle anything thrown at it.

Ideally:

You're looking at Fred's record and who see his list of classes he's taken.

And then in one portal, you can see all of his fellow classmates regardless of class.

Then, in another portal, you can see his classmates for Biology (no particular reason *why* Biology, but let's go with it).

Then, in another portal, you can see his classmates for any class he wants which would be selected by a global pop-up.

I hope this makes sense, thanks! :

It's nice to see that you have your requirements specified so precisely... :

To keep this simple (and short!), let's say you have a checkbox field called Selections, populated by a value list of ClassID from the join table (showing only related values). So in Fred's case, you can select any combination of Algebra, Biology and Chemistry.

1. Define a relationship from People to a new occurrence of the join table as:

People::Selections = Join 2::ClassID

AND

People::PersonID ≠ Join 2::PersonID

2. Define a relationship from Join 2 to a new occurrence of the People table as:

Join 2::PersonID = People 2::PersonID

Place a portal to People 2 on your layout. Note that this is equivalent to performing an OR find, i.e. if you selected Algebra and Biology, you will see people taking either Algebra or Biology (or both).

Create an account or sign in to comment

Important Information

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

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.