3 Replies Latest reply on Apr 11, 2012 1:22 AM by GuyStevens

    Child table entry issue

    KeithNordyke

      Title

      Child table entry issue

      Post

      I have a "primary" table that consists of clients.  Each client has a unique ID number assigned to it.  I want to maintain a child table to capture who are the family and friends of the client that may contact me.  The child table will contain first,last name, address, city, state, zip, nature of relationship, email address, cell, home and work number.  I can't figure out how to pull this together.  There will always be ONLY one client but it is possible to have multiple family and friend contacts under that number.  I tried a number of relationships and then tried to create a portal for the child data.  I can't seem to make it work.  Thoughts?  Thanks

       

      Keith

        • 1. Re: Child table entry issue
          Sorbsbuster

          In the Child Table have a field 'ClientIDRelatedTo'.  In that field, enter the ID of the 'Parent' client.

          Create a relationship from the Parent Table to the Child Table linking ClientID = ClientIDRelatedTo

          Draw a portal on the Client Layoubased on that relationship, and include in it the details of the Child Record.

          That will show you that it works - there are easier ways to create a Child Record if you are adding a new one.

          Another point to consider is to have all your contacts in one table (as some 'Children' may become 'Clients' latere, maybe?).  Then just add that ClientIDRelatedTo field to the Client Table, and have the same relationship, but from the Client Table to another Table Occurance oif itself.  You could denote the status of the Client Records by tagging with a 'ClientYesNo' field.

          • 2. Re: Child table entry issue
            GuyStevens

            It's not really very hard to do.

            Create a Table "Clients" with following fields:
            ClientId  = Auto enter Value - Serial Number
            Client Name
            Phone
            Adress
            ....

             

            Create a table "Family" with following Fields:
            ID = Auto enter Value - Serial Number
            ClientIfFK  =  Number field
            FirstName
            LastName
            ...

            Then go to the relationships dialogue and make following relationship.
            Clients::ClientId---------[IsEqual to]-----<Family::ClientIdFk

            Double click the [=] sign in the middle of the relationship and select "Allow creation of records via this relationship" on the "Family" side of the relationship.
            and select "Delete related records...

            The first options allows you to create new family members from within a layout based on the "Client" Table.

            The second option deletes all family records when you delete a client. That way you don't have any orphaned records.

            Then create a layout based on the "Clients" table and in there create a portal based on the "Family" table.

            I made you a little demo if you want you can look at that.

            http://dl.dropbox.com/u/18099008/Demo_Files/SimpleChildPortalDaSaint.fp7
            If you get stuck, let us know.

            • 3. Re: Child table entry issue
              GuyStevens

              AAHHH, Looks like Sorbsbuster beat me :)