Search code examples
relational-databasefilemaker

FileMaker Pro Linking database relationships


I am making a Data base to manage all the computers in my business, i have two tables:
1)lists all the serial numbers and computer ip address,
2)displays a form for me to write a diagnostic report.

What i want to do, is when i type the computers ip address into the form, i want it to look up the serial number on the linked table, and then automatically populate the ip address field in the form.


Solution

  • Step 1 is to establish a relationship between your two tables, which I'll call SerialNumbers and DiagnosticReports.

    Presumably in your SerialNumbers table you have the following fields:

    1. Serial Number
    2. IP Address

    And in your DiagnosticReports tabel you have the following fields:

    1. Serial Number
    2. Notes
    3. IP Address (if you want to capture the IP Address at the time you capture the note. This is not necessary if you always want to show the current IP Address for this serial number.)

    In the Relationships tab of the Manage Database window (File Menu > Manage > Database > Relationships Tab) you will need to draw a line from the "Serial Number" field of the SerialNumber table to the "Serial Number" field of the DiagnosticReports table

     SerialNumbers::Serial Number >----< DiagnosticReports::Serial Number
    

    From here you have a choice to make. Do you want A: To store the IP Address at the time of the Diagnostic Report or to B: Show only the current IP Address for this Serial Number.

    To do A, store the IP Address at the time the Diagnostic Report is made:

    1. Go to the Fields tab of the Manage Database window
    2. Select your DiagnosticReports table
    3. Set the IP Address field to Auto-Enter the Looked-Up value from the SerialNumbers table for the IP Address field

    To do B, show only the current IP Address for this Serial Number:

    1. While editing the a layout displaying data from the DiagnosticReports table, drag a new field onto the layout.
    2. Select the table SerialNumbers and the field IP Address.