3 Replies Latest reply on Apr 9, 2014 12:52 PM by flamecoder

    Add informtion to a record from another table



      Add informtion to a record from another table


           This should be very simple but don't know how to implement it in Filemaker 12.

           I have two tables (Insignias, Associates)

           Attributes for Insignias are (InsigniaNumber, InsigniaName, __kf_AssociateID)

           Attributes for Associates are (__kp_AssociateID, AssociateName, AssociateInitials, AssociateEmail)

           When I make a new record in Insignias I want to be able to choose from a list of Associate names. Other attributes from Associates table can be displayed with it. Nothing ever changes in the Associates table. I just want to be able to link an Associate with  Insignias.



        • 1. Re: Add informtion to a record from another table

               What you have described is a one to many relationship from Associates to Insignias. For any given Associate record, you can link it to many different Insignia records.


               Associates::__kp_AssociateID = Insignias::__kf_AssociateID

               Have you actually defined that relationship in Manage | Database | Relationships?

               And is it possible that more than one associate should link to the same Insignia? Just from the names of your tables, that seems like a possibility and if so, you need a different set up to handle what then becomes a many to many relationship.

               Sticking with your current set up and assuming that this is indeed the relationship that you have defined, then you can set up __kf_AssociateID on the Insignias layout with a drop down list or pop up menu where the value list specifies values from __kp_Associates for field 1 and AssociateName for field 2. The first field value can be hidden so that all your value list displays is the associate names.

               This is the "beginner level" method that works pretty well for modest numbers of values in your value list. (And the values in AssociateName must be unique for each associate record.) More sophisticated methods are possible that use scripting and additional relationships that work better with longer value lists and can also handle duplicate associate names.

          • 2. Re: Add informtion to a record from another table

                 Okay this works good!

                 Now I have other fields on this layout coming from the Associates table so when I select an Associate name from the pop up menu another field named Associate_Initials  is shown in a field. It works but how I noticed that I can select and change the initials on this layout and it will change in the Associate table which I don't want. How do you apply control over not being able to make changes or not allow the field to be selected?

            • 3. Re: Add informtion to a record from another table

                   I found the answer... in layout mode select the field and in the Inspector on Data tab under Behavior uncheck Field Entry's Browse Mode.