4 Replies Latest reply on May 12, 2010 2:52 AM by LaRetta_1

    What's the simplest way to go to a specific record

    AdamPWSmith

      Title

      What's the simplest way to go to a specific record

      Post

      I have two layouts in two custom sized and positioned windows - one is a detailed view of a record about a person (details) and the other is a list of those people sorted by a status field (status). I want to be able to select a record in the status window and go that record in the details window.

       

      I've seen solutions involving self joining tables, but I'm not quite at the level that I'm comfortable working with those kinds of relationships. I created a global variable to store the current record's primary key field and it seems that I ought to be able to switch to the other window and then navigate to the record with that value, but I can't find any way to do that. Is the only way to do this really a self join relationship and the Go To Related Record route? It just seems so much more complex and involved than is really necessary.

       

      Please assume my knowledge level is basic at the moment. I'm using FMPro Advanced on Snow Leopard 

       

       

        • 1. Re: What's the simplest way to go to a specific record
          hbrendel
            

          When you click on a line in list view, you are in fact selecting that record. All you have to do next is go to the detail layout and you will see that same record.

           

          You can attach a button to the line in list view that performs the script step Go To Layout (Detail) and you should be set.

           

          Success! 

          • 2. Re: What's the simplest way to go to a specific record
            diamondage_1

            Sorry to refresh this old subject.

             

            I see how to go to the same record  when in the same table instance, but what if I need to switch to a layout attached to another instance of the record table?  What's the best way to get to the same record then?

            • 3. Re: What's the simplest way to go to a specific record
              dumiya

              If I read the question correctly:

               

              I make up a button on one layout and a script to 'Go to related field' which will take me to the related field in the layout of the other table.

               

              For this to work the two tables have to be linked.

               

              If I misread - I am sorry

              • 4. Re: What's the simplest way to go to a specific record
                LaRetta_1

                Actually, you can do it and they don't have to be related at all.  If you want to jump to another layout (which is based upon same table but different table occurrence) then you can.  Let's provide names for the description ... child table occurrence has found set of 3 records.  You are on record 2.  You want to go to a layout based upon child2 to the same record.

                 

                1) If you don't care about losing your found set and only want to land on same record ...

                a) Go To Related Record [ to table occurrence child using layout based upon child2 ]

                b) Do not check 'show only related records'

                 

                2) If you want to maintain your found set use 1a but on 1b check 'show only related records' and 'match current record.'

                 

                Table occurrences based upon same table are related even without lines joining them in the graph.