5 Replies Latest reply on Nov 8, 2011 12:27 PM by philmodjunk

    GTRR Script Step



      GTRR Script Step


       I want to use the GTRR by incoporating this in a script step. But when I try the script it does nothing. However, when I use the GTRR using the button set up method this works just fine. Since I've not tried the GTRR in a script step prior, I am evidently missing something. Please shed some light on this.


        • 1. Re: GTRR Script Step

          It should work the same as when you use a single step button.

          GTRR is complex with a lot of options, "fails silently" when there are no related records to go to and throws up error messages but doesn't let you halt the script in others.

          Feel free to describe your issue in more details so we can help you spot why it didn't work for you.

          You may alsow want to read this thread to learn more about GTRR: The Complete Go To Related Record

          • 2. Re: GTRR Script Step

            Two files. Sales & Quoter     In the Sales file the relation is; Quoter::Quoter_ID = Sales::Sales_ID and In the Quoter file the relation is the same.

            In the quoter file I have a script that creates a record in Sales based on information in Quoter. In this script a set field step sets Sales::Sales_ID; Quoter::Quoter_ID.

            So when using the single step button to gtrr, I specify to get related record from: Quoter using an external table's layout and I show only related records by matching the current record only.

            However, when trying a script step to gtrr (only using a single step to test the script) and using exactly the same options in the single step button nothing happens.??????

            • 3. Re: GTRR Script Step

              In your script, add this step immediately after the GTRR step:

              Show Custom dialog [ Get ( LastError ) ]

              Then look up ErrorCodes in Filemaker help to see what error was returned.

              • 4. Re: GTRR Script Step


                • 5. Re: GTRR Script Step

                  If you look that up it means "record is missing" and in this context means that there are no related records to "go to".

                  I suggest posting an exact copy of your script. Then also tell us on what layout you are on when you perform this script and what table it specifies in "show records from" in Layout setup...

                  To post a script to the forum:

                  1. You can upload a screen shot of your script
                  2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF.
                  3. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
                  4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional look to your script. (Use the HTML option and paste the text into the HTML editor.)