People Goal 6 - Part 5: Test the results

Document created by mark_baum on Feb 1, 2015Last modified by communitymanager on May 12, 2015
Version 15Show Document
  • View in full screen mode

 


At this point, you’ve populated the foreign key in your secondary table, so now the relationship between your main table data and your secondary table data should be working properly. Let’s confirm this through some simple testing.

 

Here's an outline of what’s involved:

 

  • Find related secondary records

    From the point of view of your main table, make sure that most records are associated with at least one secondary table record.



  • Find related primary records
    
From the point of view of your secondary table, make sure that every record is associated with a main table record.



  • Spot-check your portal
    
From the point of view of your main table, spot-check your portal of related secondary table records to make sure they belong to the appropriate main table record.


  • Delete your temporary relationship
    You can delete your temporary relationship once the testing is complete.

 

To accomplish this, you will perform two find operations using a wildcard character. This is a symbol that takes the place of actual characters in your search criteria to provide more flexibility. For example, the symbol “*” stands for one or more characters. Using this symbol by itself establishes that the field is not empty (that is, it contains at least one character).


 

Goal:

 

Confirm that your work with the secondary table foreign key has caused your main table data and secondary table data to be related properly.

 

 

Steps:


 

Find related secondary records

 

  1. View your original main table layout (the one that was automatically created by FileMaker Pro) in Layout mode.

    

In the example solution, this is the “Contacts” layout.

  2. Add to the layout the related foreign key field from your secondary table.

    

In the example solution, this is the “Activities::Contact ID” field.

  3. Enter Find mode, type the * character into your related foreign key field, and perform the find.



    This is the wildcard character mentioned above. By testing whether the related field has a value, you are finding those main table records that have a valid relationship to at least one secondary table record.

  4. See how many main table records are returned by the find operation.

    

If the proportion of records to the total records is acceptable to you, you’ve passed the first test. If not, you’ll need to determine whether something went wrong when you populated the foreign key, or whether you chose the right fields for your temporary relationship (this would be a good moment to start a discussion in the New User Group).



    You may want to start by spot-checking some of the problem records against your two spreadsheets. You can view your main table problem records by clicking on the pie chart in the upper left of the screen. This displays the records that were not found, that is, the records without a relationship to the secondary table. Then try to find one of those records in your main data spreadsheet. Finally, look for records in the secondary data spreadsheet that should be connected. If there aren't any, then you don't have a problem for that record.


Find related primary records


  1. View your original secondary table layout (the one that was automatically created) in Layout mode.



    In the example solution, this is the “Activities” layout.

  2. Add to the layout the related primary key field from your main table.



    In the example solution, this is the “Contacts::Contact ID” field.

  3. Enter Find mode, type the * character into your related primary key field, and perform the find.



    By testing whether the related field has a value, you are finding those secondary table records that have a valid relationship to a main table record. This should always be true.

  4. See how many secondary table records are returned by the find operation.

    

If this find returns every record in the table, you’ve passed the second test. If not, you’ll need to do similar troubleshooting as in step 4.



    If there are very few problem records, you could try populating the secondary table foreign key field manually for each problem record. Just find the appropriate main table record, copy the main table primary key field value, and paste it into the secondary table foreign key field.


Spot-check your portal


  1. View your Main Detail layout in Browse mode.

  2. Spot check various records (being sure to jump around), looking at the secondary table data displayed in the portal.

    

Do the portal records look like they belong to the main table record in question? If so, you’ve passed the third test. If not, you’ll need to do similar troubleshooting as in step 4.



Delete your temporary relationship


  1. Feel free to delete your temporary table occurrence once the import is complete.



      

      

Attachments

    Outcomes