5 Replies Latest reply on Nov 28, 2016 4:02 PM by BruceRobertson

    Go To Related Record on current layout

    muhammad.ikram@contedia.com

      Hello.

      I was just having a go at trying some GTRR function. I unserstand how it works but i'm slightly confused about if we going to matching record on the same layout.

      i got simple database structure. my main layout is based on customer table.

       

      what i was hoping to do; when i click on one of those portal row; the record of clicked portal row would appear on left to portal.

       

      Red shows this layout is based on customer table.

       

      Blue shows a portal of site reports which are assigned to that customer.

       

      Green shows; detail of site report when a portal row is clicked.

       

      And this is my GTRR script. I want to get the mathing records from site reports table and display on this layout. It works great if i show result on sitereport layout.

       

      My question is how to display matching result on customer layout; and it would get matching records from site report.

       

      I get this error with current GTRR script.

       

       

       

      Many Thanks in Advance

        • 1. Re: Go To Related Record on current layout
          philmodjunk

          GTRR cannot be used in this fashion. You are getting an error because the specified layout (in this case, the current layout, must be based on an occurrence of the SiteReport layout, not the customer layout.

           

          The desired result could be achieved but not as you have attempted to do here.

           

          Add an id field, it can be a global field, to customer and link it to a new occurrence of SiteReport to get this type of relationship:

           

          Customer::gSelectedSiteReportID = SiteReport|Selected::ID

           

          Then use a button in your portal row to do this:

           

          Set Field [ Customer::gSelectedSiteReportID ; SiteReport::ID ]

           

          Put fields to the right of your portal selected from SiteReport|Selected, not SiteReport to show the data from the selected row in the portal.

          1 of 1 people found this helpful
          • 2. Re: Go To Related Record on current layout
            erolst

            muhammad.ikram@contedia.com wrote:

            My question is how to display matching result on customer layout;

             

            The answer is: you can't, except in a portal. If you use GtRR, then those related records become the "native" records, and they need a layout based on their own table to be displayed.

             

            The default <current layout> only works for a GTRR that uses a self-join relationship; for all other target TOs, the layout cannot display the records of the target TO, and you'll see this dialog. (Which means that that default choice for this setting is only very rarely correct the one, and you should always check it.)

             

            Make sure to select the correct layout in the GtRR setting; FileMaker will filter the list of layouts to those that are based on the same table as the target TO.

            1 of 1 people found this helpful
            • 3. Re: Go To Related Record on current layout
              muhammad.ikram@contedia.com

              Thanks for explanation.

               

              I have understood everything.

               

              Can You just clarify in more detail please.

               

              "Put fields to the right of your portal selected from SiteReport|Selected, not SiteReport to show the data from the selected row in the portal."

               

              I understand when user will click portal row; the ID of selected row will attached to global field in customers table. how the clicked row result will display than next to portal. At the minute I've just got some fields form site report table but obvs they wont work. How the related data from siteReport will displayed when the row is clicked.

               

              I have attached my sample demo

               

               

              THANKS

              • 5. Re: Go To Related Record on current layout
                BruceRobertson

                "I have understood everything."

                Well; not really.

                For instance you've got setting the global field backwards.

                But anyway, see attached.

                1 of 1 people found this helpful