3 Replies Latest reply on Jun 25, 2010 5:46 PM by FMNewbie

    database relationships



      database relationships


      FM Pro 11; Mac OS Snow Leopard


      Forgive me... still pretty new at this databasing stuff, but having a lot of fun at it.   I'm trying to get my head around relating fields in tables.  What I have is a database with several layouts that document "missions".. or jobs if you will.  I would like to also have the ability for the user to fill out an "incident report" from the same user interface as needed. I would like for these incident reports to be catalogued in a database as well. 


      The trouble is, not all missions have incidents, and not all incidents are mission related.  When I add the fields from the incident report table to a layout in the mission database it displays them as <unrelated table>.  So, I find myself looking at two tables of unrelatable data and wondering how to link the two together.


      Should I be using 2 separate databases and give up on the idea of having one databse with layouts to enter data for both types of data?  Or, should I be trying to display the incident report fields be displayed in a portal (which I don't know much about yet). 


      I'm learning by tinkering, but I think I need a little guidance on which direction to tinker.   Help???  :)








        • 1. Re: database relationships

          I would suggest

          have two tables in the one File

          One table would be 'Missions" tables with all its layouts


          One table would be the "Incident" with its layouts


          These are quite separate until they are linked.


          In each of the tables you create is a matching field for  the Job number or mission number.  

          You link these in the relationship boxes of each table (Manage Database)


          So when there is an incident you copy the 'code' from the 'mission' mission table

          and paste it into a New Record in the 'Incident' table code field.

          (There are ways to automate this)

          This links the incident to the mission.


           You will need to create a text box field in the 'incident' for the report.  But you use use the Date and time fields from the 'mission' table. but an extra date field for the date of the report.



          There are various ways in which you can view the incident report in the Mission layouts.


          Also look at the help menu about relationships.





          • 2. Re: database relationships

            You might want to read up on "Portals" in filemaker help. This is one layout object you can place on your missions layout and use it to log incidents in the related incidents table. Set up correctly, it'll automate the linking process Dumiya describes.


            You can log incidents not associated with a given mission directly on your incidents layout and simply leave the key field (Probably a MissionID field) blank.

            • 3. Re: database relationships

              That's awesome guys... thanks.    :)