3 Replies Latest reply on Jun 10, 2016 7:01 AM by jovialjay

    Go To Related Records - Not Working


      Hi folks, for the life of me i cannot puzzle this one out.


      Let me start by saying that the GTRR step works fine for me on my Mac. But when my client runs it on their Mac, it does not have a found set to work with from the GTRR and starts performing on the entire database (not the intended action at all!)


      The only difference I can see is that the Client is running FilemakerPro 14.0.5 while I am using FMAdvanced 14.0.5. I've ruled out machines, and user accounts by having them test the script on multiple machines in house, and under different users account. Their accounts are Full Access as is mine, and I can get their account and mine to work on FMA while nothing seems to work on their FMP versions.


      It's a pretty straightforward GTRR step:

      The script is GTRR: 'job_lineItems' in a  "New Window"

      √ Show Only Related records and Match all Records in Found Set

      The relation 'job_lineItems' is as follows

      Table: 'job_lineItems'; Field: 'zk_jobID_f'; Type: number (indexed) Table: 'fmJob.tog'; Field: 'zk_jobID_p'; Type: number, auto enter serial (indexed)


      So it's a Job and the Related Line items. If I'm looking at 2 Jobs with 10 lines items each, I expect my GTRR set to be 20 records that I run a script on. As I said, it works for all my testing but the client is getting "No Records Found" and when they click continue, instead of running the script on a few dozen records, it's performing on 100,000+. Yikes!


      Any thoughts?

        • 1. Re: Go To Related Records - Not Working

          GTRR and QuickFind must always be followed by an IF Get(LastError) in which you take care of the situation.


          In your case you can't debug the clients because they're on regular FMP, but you can set a $Var to Get(LastError) and if $Var Show custom message with the $var, halt script, end if.

          • 2. Re: Go To Related Records - Not Working

            post the whole script

            • 3. Re: Go To Related Records - Not Working

              I was about to post my script, but after putting some other error trapping in, we finally figured it out. It turns out it was my IMPORT step later in the script that was having the trouble.


              Since I was connecting remotely, and the client is on their internal network, the file references were seeing the database as a new instance.


              My file refernce for the import was originally this, which works for me as I connect VIA the IP Address of the compant.

              fmnet:/xx.xxx.xxx.xxx/Company Name_data

              file:Company Name_data.fmp12


              Adding one line at the top, fixed it for me and for them, since FileMaker works this list in order, if the top one doesn't work for me, it moves to the next one.

              file:Company Name_data

              fmnet:/xx.xxx.xxx.xxx/Company Name_data

              file:Company Name_data.fmp12


              Thanks for getting me to think about this more critically!