Johhhn Posted April 25, 2008 Posted April 25, 2008 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! :
comment Posted April 25, 2008 Posted April 25, 2008 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?
Johhhn Posted April 25, 2008 Author Posted April 25, 2008 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! :
comment Posted April 25, 2008 Posted April 25, 2008 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).
Recommended Posts
This topic is 6115 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 accountSign in
Already have an account? Sign in here.
Sign In Now