4 Replies Latest reply on Jun 23, 2011 4:20 AM by JackFeeney

    Relationships?

    BirgittaPersson

      Title

      Relationships?

      Post

      I've been trying to set up a database where I can link employees (they all have a specific nr) to their clients (same here). I have managed to create a client list with their info but now I don't know how to continue. Do I make a new layout in the same doc as the one for clients? Or do I make a new doc and then connect the two? ¨

      For example I want to be able to look at:

      nr 145 Josh (click on his name to get his info) and then be able to see his clients; 1 Amy, 4 Rick etc and their info. Any good ideas?

        • 1. Re: Relationships?
          JackFeeney

          Hi Birgitta,

          The people here will help you most professionaly but for the time being you might want to view the responces they made for me yesterday under the posting Relationship Deffinitons.

          Also , longer range, I've found the VTC Training CDs speak well to this info ( www.vtc.com ) Begginer, Intermediate, Advanced

          Again, the people here will provide a more professional responce but let me offer this, for now

          You have FileMaker Pro 2-Files : EMPLOYEES and CLIENTS

          I'm assuming you want to make the EMPLOYEES the Parent File and CLIENTS the Child

          Because I am unfamilure with the fields you have in your database I'm going to suggest you creat 1-file in EMPLOYEES say _kp_emply_client

          and 1-File in CLIENTS say _kf_emply_client ( text file )

          Now you have 2-Routs to go from here (spoken to in yesterdays responce to my inquiry Relationship Definitions

          You can either Relate 2-independent FileMaker (FMP) Files or you can create a Table "Clients" in EMPLOYEES and import your Client files

          I'm overly sensative to protecting EMPLOYEE file data from general viewing so I would sway to keeping the EMPLOYEES and CLIENTS as individual FMP Files , you and others may feel differently.

          If you are gong the Idependent FileMaker Fiels route:

          In EMPLOYEES , in FILES > MANAGE DATBASE go the the "Relationships" tab at the top.

          In the Relationships window, note the "+" Add relationship at the bottom, click on that and when the menue opens Select "Add FileMaker Data Source" from the "Data Source " drop down window.

          and then select the FMP CLIENTS File from the menu that opens, you may have to navigate to the folder where your Client File is kept.

          Select CLIENTS, When the 2-Relationship boxes are displayed in RELATIONSHPS, click on the EMPLOYEE field _kp_emply_client and connect it to the _kf_emply_client field . That should make you RELATIONSHIP.

          Now Creat the New Table . . . lets say Emplyee_Clients with the desired fields from EMPLOYEES , when you go to add the Fields from CLIENTS as per sop you can find them in the dropdown window that appears when you go to add them by noticing at the top of the drop down window is a dropdown list to select your source File for fields to add . . . drop it down and select your CLIENTS File and all its fields will open up for you to select from.

          Again, the people here will provide a lot more professional help, I'm very new to FMP but I offer this to help for the time being.

          Again, Check out the VTC Training CDs at www.VTC.Com I've found them great help. I think you can listen to some exerpts before purchasing if you go to there Website and then go to FMP

          Hope I didn't waist your time

          Jack

          PS in my home state, they have relatively recently passed laws for protecting employee personal data from getting hacked, it is kind of restricive, If you are dealing wirth similar issues I'd be interested in how you address them.

          • 2. Re: Relationships?
            philmodjunk

            I don't think it's necessary to separate the tables into two files to keep Employee data from being accessible. There are ways to limit access in Manage | Security to control access to employee data and this works better than just having two separate files for controlling what data is visible to each user.

            If any given customer is to be linked to only one employee at any given time, you shouldn't need an extra table. If one customer could be linked to multiple employees, then an added "join" table to manage such a "many to many" relationship would be required.

            Assuming One employee for any given customer, but Employees can be linked to many customers:

            Employees::EmployeeID = Customers::EmployeeID

            Is the only relationship you need to make this happen. A portal to Customers on your Employees layout can list all the customers for which they are responsibile and you can use this portal to add/change customer assignments to your employees. Likewise, the EmployeeID field in Customers can be formatted as a drop down of EmployeeID's and Names to control assignments from a Customers layout.

            • 3. Re: Relationships?
              BirgittaPersson

              Wow, thanks for the answers! I'll try to look deeper into them and see what I can manage to do. But I'm almost giving up on FMP, hehe!

              I actually bought the "missing manual" for FMP but there's little help unless you know exactly what you're looking for. Thanks again! :)

              • 4. Re: Relationships?
                JackFeeney

                I've gotten a lot out of the www.vtc.com Training CD's try the Beginner and see if you like it . . . go to their website and I think they let you try them out ( a few chapters ) before you purchase I think the instructor is John Osboren and I find him very easy to follow and he goes the extra mile and will answere questions you have on his website www.databasepros.com I'm 1/2 way through the Intermediate CD and again, I've gotten a lot out of it. Good luck

                Jack