8 Replies Latest reply on Jul 28, 2011 4:55 PM by marinusGeuens

    Problem with related tables



      Problem with related tables


      Hi everyone,

      I am trying to make a database to make conformity certificats.
      Everything works as it supose to be, only I have different models and I want them all to follow
      on 1 chassisnumber it is 17 digits long. I have put it in so when I add a record it puts +1 to every record i create, but I have multiple tables that all have to depend on that chassisnumber. I have tryed to relate the tabels together and this works. But If I change the field so it should take the chassisnumber of the main table it is not visible. A I am just starting to get to know filemaker11 and watched tutorial videos of Lynda.com I do exactly the same thing that the instructor does and applyed it to my database, but it does not work. Anyone have some ideas for me how to make it work? Thanks (excuse me for my bad english)

        • 1. Re: Problem with related tables

          Don't use your 17 digit number to link one table to others. While this can be done, it's not a good idea. Instead, enter the chassis number in a normal data field and then refer back to this parent record whenever you need the chassis number. That way, should the number ever be entered in error in the parent record, you can correct the mistake without losing the link to your related records in other tables.

          This can give you a relationship like this:

          Chassis::ChassisID = ChildTable::ChassisID

          Where ChassisID is an auto-entered serial number field in Chassis and a number field in each related ChildTable.

          ChassisNumber is then a text or number field you define in Chassis. If you are on the layout of a related ChildTable, you can add the Chassis::ChassisNumber field directly to this layout and it will display the corrent value from the related parent (Chassis) record.

          • 2. Re: Problem with related tables

            Oké, thank you.

            So with chassisId you just mean the name of the trailer and not the 17digit number?

            So I just link the name from Chassis::ChassisID = ChildTable::ChassisIDfk and you think the records wil become visible then?

            I am sorry for the questions but I am stil learning. I was also thinking of making a script that just copy's and paste's the chassis number where it is

            needed, but I don't know if this is a good idea.

            Thank you for the fast reply

            • 3. Re: Problem with related tables

              No, ChassisID would be an auto-entered serial number field. This is a file option setting you define on a number field in Manage | Database | Fields.

              • 4. Re: Problem with related tables

                Oké, so you mean this is just an ordenary auto entered serial number field with no special numbers,
                this is just a number to seporate the records from eachoter by numbers then?

                Thank you for your help.

                • 5. Re: Problem with related tables

                  That's it exactly. You can still have fields for your other ID numbers, just don't use them as key fields in your relationships and your database will be easier to manage.

                  • 6. Re: Problem with related tables

                    Oke thank you,

                    I did this now. I named them "controletabelID" and the childtable I named "controletabelIDfk" and related these together.
                    But when I put the chassisnumer field on te related records. they stil do not show. (only in the parent table it does, but not in the childtables)
                    I keep having a blank field with no value inthere. I have made a new field and set it to related records (chassisnumber)
                    I have to say the chassinumber field is also an auto enter value that per record that I create, goes +1, does this have anything to do with it?

                    • 7. Re: Problem with related tables

                      You'll need to take a look at your relationship between your tables and the values in the key fields used in that relationship.

                      If you have this relationship in Manage | Database | Relationships:

                      ControlTable::ControlTableID = ChildTable::ControlTableIDfk

                      Then you can add ControlTable::ChassisNumber to a layout to ChildTable. If the ChildTable::ControlTableIDfk = 1, then the ChassisNumber from the record in ControlTable where ControlTableID = 1 will appear on your layout.

                      • 8. Re: Problem with related tables

                        I did everything that you sayed and checked 2 times. Still I do not have any value in them. :S

                        I tryed the same thing with the tables of the Lynda databases I got and that does work with them.

                        So I think there will be something wrong with my table then. Perhaps it is best to start over.