dbTalk Databases Forums  

displaying 2 relationships in one portal

comp.databases.filemaker comp.databases.filemaker


Discuss displaying 2 relationships in one portal in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Darren
 
Posts: n/a

Default displaying 2 relationships in one portal - 02-13-2007 , 07:10 AM






Hello,

How would I solve this issue? I am working on a college registration
database in 8.5. There is a Teacher table and a Course table. Each
course can have a Teacher and an optional Co-Teacher, both of which
come from the Teacher table.

I need a portal/relationship where I can display all of the Courses
that a teacher has Taught or Co-Taught.

I believe this is probably simple and just involves a slightly more
complex relationship.

Any brilliant ideas?

Darren


Reply With Quote
  #2  
Old   
Grip
 
Posts: n/a

Default Re: displaying 2 relationships in one portal - 02-13-2007 , 08:33 AM






Create a calculated field in the Course table named
Instructors = Teacher & "P" & CoTeacher
where P is a carriage return. Relate to THAT field.

G

On Feb 13, 6:10 am, "Darren" <darrenburgess1... (AT) gmail (DOT) com> wrote:
Quote:
Hello,

How would I solve this issue? I am working on a college registration
database in 8.5. There is a Teacher table and a Course table. Each
course can have a Teacher and an optional Co-Teacher, both of which
come from the Teacher table.

I need a portal/relationship where I can display all of the Courses
that a teacher has Taught or Co-Taught.

I believe this is probably simple and just involves a slightly more
complex relationship.

Any brilliant ideas?

Darren



Reply With Quote
  #3  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: displaying 2 relationships in one portal - 02-13-2007 , 10:45 AM



Create a third relationship for this purpose that simply displays all
classes for a teacher regardless of whether they were teaching or
co-teaching.

Darren wrote:
Quote:
Hello,

How would I solve this issue? I am working on a college registration
database in 8.5. There is a Teacher table and a Course table. Each
course can have a Teacher and an optional Co-Teacher, both of which
come from the Teacher table.

I need a portal/relationship where I can display all of the Courses
that a teacher has Taught or Co-Taught.

I believe this is probably simple and just involves a slightly more
complex relationship.

Any brilliant ideas?

Darren

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #4  
Old   
Darren
 
Posts: n/a

Default Re: displaying 2 relationships in one portal - 02-13-2007 , 03:39 PM



So what would this relationship look like?

I have a teacher table with a TeacherID and a course table with
TeacherID and CoTeacherID

I thought I could do this:

teacher:TeacherID = course:TeacherID AND teacher:teacherID =
course:CoTeacherID

but I don't think that will work.

How would you structure the third relationship?

Thank you.
Darren

On Feb 13, 11:45 am, Howard Schlossberg
<how... (AT) antispahm (DOT) fmprosolutions.com> wrote:
Quote:
Create a third relationship for this purpose that simply displays all
classes for a teacher regardless of whether they were teaching or
co-teaching.



Reply With Quote
  #5  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: displaying 2 relationships in one portal - 02-13-2007 , 04:35 PM



I would go with what Grip has already replied. Create a stored/indexed
calc field in Courses that includes both IDs separated by a return
character. Create your third relationship from The teacherID in the
Teachers table to this new calc field in Courses.

Darren wrote:
Quote:
So what would this relationship look like?

I have a teacher table with a TeacherID and a course table with
TeacherID and CoTeacherID

I thought I could do this:

teacher:TeacherID = course:TeacherID AND teacher:teacherID =
course:CoTeacherID

but I don't think that will work.

How would you structure the third relationship?

Thank you.
Darren

On Feb 13, 11:45 am, Howard Schlossberg
how... (AT) antispahm (DOT) fmprosolutions.com> wrote:
Create a third relationship for this purpose that simply displays all
classes for a teacher regardless of whether they were teaching or
co-teaching.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #6  
Old   
Bill
 
Posts: n/a

Default Re: displaying 2 relationships in one portal - 02-13-2007 , 09:42 PM



In article <12t4fdqr2b6cc76 (AT) corp (DOT) supernews.com>,
Howard Schlossberg <howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
I would go with what Grip has already replied. Create a stored/indexed
calc field in Courses that includes both IDs separated by a return
character. Create your third relationship from The teacherID in the
Teachers table to this new calc field in Courses.

Darren wrote:
So what would this relationship look like?

I have a teacher table with a TeacherID and a course table with
TeacherID and CoTeacherID

I thought I could do this:

teacher:TeacherID = course:TeacherID AND teacher:teacherID =
course:CoTeacherID

but I don't think that will work.

How would you structure the third relationship?

Thank you.
Darren

On Feb 13, 11:45 am, Howard Schlossberg
how... (AT) antispahm (DOT) fmprosolutions.com> wrote:
Create a third relationship for this purpose that simply displays all
classes for a teacher regardless of whether they were teaching or
co-teaching.


You can do a many-to-many, courses to teachers. That requires an
intermediate join table. Call the Join table Course_Teacher.
Course_Teacher will have fields kfCourseID and kfTeacherID, as well as
other fields as needed.

Course::kpCourseID = Course_Teacher::kfCourseID
Teacher::kpTeacherID = Course_Teacher::kfTeacherID

Now you can have one portal in a layout of Course showing Course_Teacher
and the downstream teacher info, and conversely one portal in a Teacher
layout showing Course_Teacher and downstream Course info.

Course_Teacher could contain a field to show ther teacher assigned as
lead teacher, co-teacher, etc.

--
For email, change <fake> to <earthlink>
Bill Collins


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.