3 Replies Latest reply on Mar 26, 2010 1:35 PM by philmodjunk

    Navigate to Parent Record from different Table

    JerryAPowers

      Title

      Navigate to Parent Record from different Table

      Post

      I'm sure the solution is simple but after hours of searching this and other forums I cannot find an answer.  I have an application that has multiple tables.  The 2 tables involved in this includes a "Real Estate Agent" database containing over 4000 records.  The other table is the Property database in which I have a Relationship between the 2 tables joining the Real Estate Agent Full Name.  I would like to have button in the Property table with the Real Estate Agent that allows the user to quickly navigate to that Agent's record in the Real Estate Agent database.

       

      I thought that the solution was Go To Related Record but I can't seem to get it to function.  So far, the single line script is:

       

      Go to Related Record[Show only related records; From table: "Real Estate Agents"; Using layout: "Form View Real Estate Agents" (Real Estate Agents)]

       

      When I run the script from the Property layout nothing happens.  What am I missing here?

       

      Thank you for any assistance!

        • 1. Re: Navigate to Parent Record from different Table
          philmodjunk

          With GTRR "nothing happens" is the result when there are no matching records via the specified relationship. Check your relationship and the values stored in the match fields that define your relationship to make sure that they truly match. A quick test to make sure that this is set up correctly is to temporarily place a portal to your agent table on your property layout and confirm that you can see fields from the right agent record. If you can't see any records in your portal, check to see why not.

           

          On a further design note: It's really not a good idea to use a person's name to link records. What happens if Mary Smith get's married and changes her name to Mary Jones? What happens if you enter an agent's name incorrectly and then have to go back and correct it? In both cases, the name change will break the link between your two tables for that agent. Instead, you should use an Agent ID number set up as an auto-entered serial number in your agents table.

           

          If you want to read further on GTRR:

           

          Go To Related Records is a very useful tool, but which is very poorly documented. To learn more about GTRR, click the following link:

          The Complete Go To Related Record

          • 2. Re: Navigate to Parent Record from different Table
            JerryAPowers

            Phil - Thank you for the reply!  What I didn't mention is that the Agent name entered in the Property record is from a drop-down value list generated from the Real Estate Agent parent table.  Therefore, I know that the Agent name exists because it is in the Value list and I can verify that it still exists.

             

            I agree that linking based on a person's name is not a good practice.  However, I'm still trying to figure out how to have a drop-down value list of the names that works with the serial # of the agent's name.  I've seen in the past where there are 2 identical names and only 1 is displayed in the value list.  I don't have that problem yet with this table but it could happen with one the program users in the future.  Once I figure out how to redo the link then I am going to fix the potential problem.  I just need to find an example of how it works.

             

            I don't know if a portal would be a good solution since I will always just have 1 Real Estate Agent assigned to a property.  Any further help would be greatly appreciated!

            • 3. Re: Navigate to Parent Record from different Table
              philmodjunk

              The portal suggestion is just a way to test your design to see if the relationship is correct. If you can see a record in the portal, GTRR should work for you. If you can't then either your relationship isn't defined correctly or you don't have the matching data you think you have in the key fields themselves.

               

              Here's a method for name searching when the relationship is based on serial number ID's:

               

              Tutorial: How to use an auto-complete drop down list when selecting records related by ID number