9 Replies Latest reply on Feb 27, 2013 4:42 PM by MikeDimino

    Sharing a relationship



      Sharing a relationship


           I am trying to create a relationship with my customers list and my time sheets. Why do I get this message for __pkCustomerID to _fkCustomerID sharing but not for __pkItemID to _fkItem ID related in both "Item Purchases" and "Time Sheet"?

           Also if any of the experts see problems with my Primary and Foreign key fields please point it out. Everything else seems to be working fine so far.

           Thanks to every one who ad offered advice so far.


        • 1. Re: Sharing a relationship

               It means exactly what is says. You already have one relationship path from Item Purchase to Items to TimeSheet. You cannot add relationships that define a second path between the same two table occurrences such as Item Purchase to Customer Jobs to TIme Sheet. This would prevent FileMaker from evaluating a reference to TimeSheet from the context of a recod in Item Purchase, it wouldn't be able to tell whether to use Items to Timesheet or Customer Jobs to Time Sheet.

               The solution is to create a new Table Occurrence for one of these tables so that such a "second path" does not exist. If you click OK in this error dialog, FileMaker will create a new occurrence for you, but it may or may not be the correct occurrence to duplicate.

               See this link for more on Table Occurrences and how to use them: Tutorial: What are Table Occurrences?

          • 2. Re: Sharing a relationship

                 Thank you Phil. I understand. I will let you know how I make out. 


            • 3. Re: Sharing a relationship

                   Phil, everything works great. I have this mental block keep thinking that these relationships are the actual databases not just occurrence's. I thought that if I started a time sheet 2 they would be separate data but they are not. Thanks again I am getting threw this pretty well. 


                   I would like to use this database to build on and add other forms like Credit Card purchases. All for the purpose of capturing data from field expenses for job costing. I am wondering if It would be smart to add a table called HOME with buttons to take you to the respective form and reports. Sort of like the attached picture. With maybe a Logo and some important information portals on it. 

                   If this is a good idea how would I get it to open to the HOME page every time?

              • 4. Re: Sharing a relationship

                     Whether you create a table named "home" or not, a layout named "home" can be created. (You can create any number of layouts based on the same table occurrence.)

                     A separate table for such a home, dashboard or Main Menu layout is often used as an easy way to keep menu options such as new record, delete record etc from affecting any real data when such is selected from this "home" layout, but you can also use Manage | Security or (if you have FileMaker Advanced), a custom menu to keep users from doing this so it's not your only option. If you do define such a table, it often does not need to have any fields defined in it.

                     If you take a look at File Options in the file menu, you'll find that you can use File Options to specify which layout is always the first layout to appear when the file is opened.

                • 5. Re: Sharing a relationship

                       Thanks Phil,

                       Things are working great. I have set the file to always open to the "Home" layout and this helps very much.

                  • 6. Re: Sharing a relationship

                         Ok I have corrected my relationships added lists for multiple occurrences. Problem is when I chose the fkCustomer from the popup window the Customer fild does not populate. Also the same for the Job Cost field. Customer is on the Credit Card 2, and Item is on the Credit Card 3. Do I need to do something different to use this related data? 


                    • 7. Re: Sharing a relationship
                      /files/048cf9dc7f/Screen_Shot_2013-02-27_at_9.15.27_AM.png 1280x787
                      • 8. Re: Sharing a relationship

                             First: Filemaker incorrectly uses "Table" in many places where it would more accurately read "Table occurrence". See that "table" designation for Credit Card in the status tool bar when you are in layout mode? (That last screen shot really helps me to explain what you need to do.) This indicates that your layout is based on the Credit Card table occurrence, not the Credit Card 2 nor the Credit Card 3 occurrences. Anything you put on the layout will function from that table occurrence "context".

                             To see data appear from the CustomerJobs table, make a new occurrence of this table by clicking it and then clicking the duplicate button (two green plus signs). Link that new occurrence into Credit card and then  use references to this new occurrence to display data from the Customer Job table. For example, if the new occurrence is named CustomerJobs 2, you can use the field tool to add the Customer field from Customer Jobs 2 to display data once you select a value in the _fk field.

                        • 9. Re: Sharing a relationship

                               PERFECT thanks Phil.Thank you very much.