4 Replies Latest reply on Apr 27, 2015 8:09 AM by JeffBroderick

    Go To Related Record unexpected action

    JeffBroderick

      Title

      Go To Related Record unexpected action

      Post

      I have used GTRR many times and never ran into this behavior.

      I have an invoicing solution that auto numbers and labels each payment form with a suffix, indicating Invoice, Cash Receipt, or Credit.  IN, RE, CR for example.

      I have three different portals that filter each group of by the suffix so it's only showing the forms from the portal title - All Invoices, All Receipts or All Credits.

      The portal row has the payment form number with a button to Go To Related Record.

      The portal is based on the table called ReceiptForm and the related record from Receipt Form.  I have selected to only show only related Records and Match Current Record Only.

      The button is attached to the receipt form number and when it's chosen, it is choosing all of the forms that are filtered in that portal instead of showing the single invoice that is the related record.

      There are only 12 test forms and I can see that one portal shows 6 records, one shows 5 records and the other button shows 1 record, which is how I determined that I'm getting all of the filtered forms and not just the one I choose.

      I should add that the record shown is the last record displayed in the portal where the button starts the process.

        • 1. Re: Go To Related Record unexpected action
          Jade

          One thing to check is that the button in Layout Mode fits well within the portal row's height.

          • 2. Re: Go To Related Record unexpected action
            JeffBroderick

            Thanks Jade,

            The button is attached to the field that contains the invoice number in the portal.  That field is contained within the portal boundaries, as all the other invoice numbers do show up.

            • 3. Re: Go To Related Record unexpected action
              philmodjunk

              If you have this relationship:

              LayoutTO----<PortalTO

              And you use GTRR performed from a button click inside the portal row of the portal to PortalTO, GTRR brings up a found set of all the records that are related to the current record in the LayoutTO, not just the PortalTO record that had its button clicked.

              But the record of that found set on the specified target layout that is now the current record, should be the record that you clicked in the portal row.

              If that record is not the current record, something has interfered--a common culprit is a script trigger performed script as the change in layouts that the GTRR causes will trip any number of script tirggers if they have been set up to perform scripts.

              This is a place where FileMaker Advanced can save you a lot of time as you could enable the script debugger, then click the button and step through the script to see if any trigger controlled scripts popup and interrupt your script and also to see at what point the expected portal record loses the focus needed in order for this to work.

              • 4. Re: Go To Related Record unexpected action
                JeffBroderick

                Thanks Phil - nailed it!

                I didn't consider using the Script Debugger since my button was "working" and it was a single action button (GTRR).  

                Great lesson on how to use the resources already built into the system.

                I had forgotten a little feature I added that made it so when that layout was entered, the last record was already showing. Palm smack to forehead.

                Also, please remember to put your Adventures Link in your replies.  I found (and liked) your page after out of curiosity I blew up your Caulkins Consulting folder icon on your avatar.

                On first look, it looks like Adventures in FileMaking 1 and Adventures in FileMaking 2 are going to be a great learning aid.  I will be showing my appreciation for those great tools later tonight via Paypal.  Thank you so much.

                https://www.facebook.com/CaulkinsConsulting