Placing fields from Multiple tables on one portal
Post:
I am trying to place fields from multiple tables into a portal. I am using FM Pro Advanced 11.0v3; Windows XP Professional, Version 2002, Service Pack 3, soon to convert to Windows 7. This database will be used in IWP and my knowledge of FMP is at the end of the Beginner stage.
My situation: 6 tables (Employee, Workload, Report, Rept_Empl (a join table to fix the many to many relationship for Workload and Report), Location, and Assignment.
I have a layout based on REPORT. On this layout, I have a portal that I want to populate with fields from EMPLOYEES and WORKLOAD. On this layout, I also have fields from the LOCATION table as well as other fields from REPORT table but they are not in the portal. This is what I want to do.
1) Create new record and REPORT::_kp_ReportID is populated (auto-enter serial)
2) Select the REPORT::_kf_LocationID on the layout. This field is a drop-down menu (populated from LOCATION table). Once the location is selected from this drop down menu, the EMPLOYEE portal is populated with the employees assigned to that location.
3) Enter the month and year of report in REPORT::month and REPORT::year fields which are not in the portal.
4) Create a new workload record for each employee listed on the portal via the portal.
I have been successful in populating the EMPLOYEE portal, however, when I create a new REPORT record and select the location, the WORKLOAD fields are already populated with previously entered data. The only time I want to see previously entered data in the WORKLOAD fields is if the REPORT::month and REPORT::year matches WORKLOAD::month and WORKLOAD::year.
The theme is: LOCATION has many REPORTS but a REPORT can only be about one LOCATION. LOCATION can have many ASSIGNMENTS but ASSIGNMENTS can have only one EMPLOYEE and EMPLOYEE can have many ASSIGNMENTS. EMPLOYEES have many WORKLOADS.
I have been working on this for over two weeks and have tried many different relationships, read hundreds of pages of documentation but cannot get what I want. Please help.
ANSWER
People >--< Events Many to many
People >-- Attendance --< Events Many to One to Many [Join Table] fields from both People and Events can be on Attendance
People >--< Associations Many to Many
People >-- Membership --< Asscociations Many to One to Many [Join Table] fields from both People and Asscociations can be on Membership
Membership >-- Overview --< Attendance unsure on how to phrase this....
http://forums.filemaker.com/posts/3d8b364a6c
Tutorial: What are Table Occurrences?
http://dwaynewright.squarespace.com/filemaker-relationships/2009/5/23/filemaker-join-tables-explored.html
CHAPTER 05: About Relational Design
The idea behind FileMaker join tables is that you have two (or more) table occurrences that are linked together via a middle table occurrence. Because FileMaker relationships can flow from one table occurrence, through another table occurrence to a table occurrence on the other side, you can have an almost unlimited number of interlocking relationship combinations.
The join table is designed to support many to many relationships. In a many to many relationship a collection of records in one table occurrence can share a relationship to many records in another table occurrence. Here I have a few illustrations that might help.
EXAMPLE - A car mechanic may have worked on many cars and a car may have been worked on by many mechanics. So if you wanted all the cars a mechanic has worked on and all the mechanics that have worked on all those cars, you might have an impressive list.
EXAMPLE - A movie may have many actors and each actor may have been in many movies. So if you wanted a list of all the actors in a movie and then a list of all the movies those actors had been in, you would probably have a large list.
EXAMPLE - A high school teacher may have many students and each student may have many teachers. So if said you wanted to find all the students for a particular teacher and all of their associated teachers ... you would get a very big list.
So a join table will likely have a primary key field but it isn’t used for much. The power comes from the collection of foreign key fields it contains and how they interact with the data. Normally, a join table will have a foreign key field for each table it links, to support the join operation. When you are talking about a join table setup, it is not uncommon to call the central table the join ... obviously .. and refer to the linked table occurrences as the outer tables. This is because they circle the central join table in an outer orbit.
<SNIP>
http://filemaker.com/11help/index.html
Home > Designing and creating databases > Creating a database > About planning a database
About planning a database
A well-designed database promotes consistent data entry and retrieval, and reduces the existence of duplicate data among the database tables. Relational database tables work together to ensure that the correct data is available when you need it. It’s a good idea to plan a database on paper first.
Follow these general steps to plan a database:
<SNIP>
http://help.filemaker.com/app/answers/detail/a_id/3248/related/1
Relational Database Design 101 (part 1 of 3): Designing a Flat File Database
http://help.filemaker.com/app/answers/detail/a_id/3247/related/1
Relational Database Design 101 (part 2 of 3)
http://help.filemaker.com/app/answers/detail/a_id/3246/related/1
Relational Database Design 101 (part 3 of 3)
MY STANDARD LIST OF FILEMAKER LINKS
The White Paper for FMP Novices is useful -
http://foundationdbs.com/downloads.html
<SNIP>
Your new post is loading...