3 Replies Latest reply on Jun 18, 2017 6:39 PM by philmodjunk

    Help making a Beekeeping tracking database


      I am relatively new to filemaker and needed some help teasing out a project i am planning on building. I am a hobby beekeeper and I want to create a database to track our hobby activities, apiaries, hives, equipment, honey harvest, etc. while I have a concept I am getting stuck on the join table stuff and I would love if someone could help me tease this out.


      so I am going to start here on a very basic level. I have two tables: Apiary and Hive

      Here is my problem:

      1. An Apiary can have one to many Hives

      2. A Hive can only belong to one Apiary


      I get if is make a direct relationship from Apiary to Hive I can then only have one related table, well obviously that doesn't work. Cause a single Apiary may have 8 Unique Hives. So I am stuck with the Join table line item stuff...


      the second part part of the problem is if for some reason I have to move a hive from say Apiary 1 to Apiary 2 I can make that change as well.

      I will start with that I am sure I will have more questions as I build forth



        • 1. Re: Help making a Beekeeping tracking database

          You have a one to many relationship from Apiary to Hives:




          Apiary::__pkApiaryID = Hives::_fkApiaryID


          __pkApiaryID should auto-enter get (UUID) into a text field with the "Do not replace..." check box cleared or a number field that auto-enters a serial number. _fkApiaryID should be a text (UUID) or number (serial #) field.


          No join table needed.

          • 2. Re: Help making a Beekeeping tracking database

            Thanks that was what I did.. and i see i used the wrong table in the portal to add the hives to the Apiary...


            Now the only other thing with regards to this relationship i need help with is I want the Hive record to also contain what Apiary it is in.

            For Example in a Hive Record:




            Hive::Name_Apiary  -this is pulled from the Apiary::Name_Apiary



            The problem is probably in my thinking in relationship direction. I have a Layout that Shows Records from Hive table i cannot figure out how to get the Apiary name to show in the Individual related Hive Record.


            thanks again... i am slowly getting the hang of this...

            • 3. Re: Help making a Beekeeping tracking database

              You don't need that field, you already have it in your Apiary table and can use it. As long as there's no unindexed field used as a match field, and you don't have that here, relationships work both directions.


              Once you have linked a Hive to an Apiary by selecting the correct _fk value, You can simply add the Apiary::Name field to a layout based on Hive and it will show the current Apiary's name. If you move the hive to a different Apiary and update the _fk field to the new Apiary ID, this name will automatically update as it will now show data from a different Apiary record.


              Ps: My family farms almonds and we really rely on you folks for our crop. Hope your hives stay healthy and productive!