5 Replies Latest reply on Jul 31, 2009 6:21 AM by TSGal

    match key

    Felicity

      Title

      match key

      Post

      Hello, I am using the ready-made Task database in Filemaker Pro 10. In the Contact management table there is a field with the name k_1 and the primary key is called k_ID_Contact. I know this naming convention is a match key but I am not sure how they work. Would someone be able to explain it to me.

       

      Thanks a lot.

       

      Cheers,

       

      Felicity 

        • 1. Re: match key
          TSGal

          Felicity:

           

          Thank you for your post.

           

          Unfortunately, after taking a quick look at the Contacts Management.fp7 database file, I cannot find the k_1 key field.

           

          A key field is used to link two tables together.  Let's take a simplistic case of a grocery invoice.  You may buy 1 item or 100 items.  Therefore, there will be 1 Invoice with one or more items.  You wouldn't have 100 fields for that one invoice, with each field .  Instead, you would have an Invoice ID and a SKU ID.  The SKU ID would then automatically give you information about the description and the price.  That way, you can just link to the information without entering it again.

           

          Another example is selling information to a customer.  You may provide a customer ID, and your name, address, city, state, zip , phone, etc. is automatically linked to the invoice.

           

          Does this make sense?

           

          In the Contacts Management.fp7 file, pull down the File menu and select "Manage -> Database...".  Click on the Relationships tab, and you will see links to different tables.  the yellow highlighted area explains some of the fundamentals of Relationships.

           

          The k_ID_Contact field links to the Notes table.  This allows you to write many notes and attach it to the specific Contact, without having to put all that information in that one record.

           

          I leave the other key fields for you to explore.

           

          Let me know if you need clarification for any of the above steps.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: match key
            Felicity
              

            Thanks TSGAL.  The k_1 field is in the Task Management.fp7 file. It is used to link the contacts to other relationships. WOuld you mind looking at that and telling me what it does.

             

            Thanks,

             

            Felicity 

            • 3. Re: match key
              TSGal

              Felicity:

               

              Thanks for the file information.

               

              Looking at the Relationships tab, I see that k_1 is the field that connects the Contact Management table to the Tasks table.  In the Contact Management table, the value is set to 1 based upon the Projects table, and in the Tasks table, it is set to 1.  Therefore, it links the Projects to the Tasks table through the Contact Management table.  Is this what you need?

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: match key
                Felicity
                  

                Thanks TSGAL, 

                 

                I am going to change the database so that tasks can be assigned to Staff not Contacts. Contacts can be linked to projects but tasks are completed by staff. therefore, I will use the same match key in staff. What do you think?

                 

                Cheers, 

                 

                Felicity 

                • 5. Re: match key
                  TSGal

                  Felicity:

                   

                  After looking closely at the Task Management database file, I see no reference to a Staff table.  If you created one, then you can change the relationships from Contacts to Staff using the same technique (depending on field names in the Staff table).

                   

                  TSGal

                  FileMaker, Inc.