8 Replies Latest reply on Nov 13, 2013 9:20 AM by IT_User

    GTRR, New Window, External File



      GTRR, New Window, External File


           So I have a Go to Related Record step that opens a new window in an external file.

           When I leave it just like that the new window is the main focus.  I'm leaving it like that for now, because I want it to be the main focus.

           However, for the new window I can use any more (at least Window) script steps.  When I do a Select Window and Adjust Window, it still goes back to the parent window.  I tried both with a variable and text, but it doesn't seem to matter.

           Even a Pause script step doesn't seem to help.

           I was looking at this: http://forums.filemaker.com/posts/9253613387

           And I think I'm doing it right.  Any help is appreciated.  Thanks!

        • 1. Re: GTRR, New Window, External File

               Select window puts the focus on the window you set up the script to select. you can select the current window--which doesn't do much for your script or you can select the script by name and you can, if you want, restrict the named window to be a window from the current file.

               Adjust Window will adjust whatever window currently has the focus so you may need to precede it with Select Window in order to select the window to be adjusted.

               And Move/resize window may actually be the script step to use in place of Adjust Window in some cases. It includes a parameter where you name the window to be adjusted so you can use it to adjust a window that does not currently have the focus so long as the newly opened window is not specified to be Modal.

          • 2. Re: GTRR, New Window, External File

                 Thanks, Phil for your answer!

                 Ok, so it is the Adjust Window that seems to be the problem, even with the Select Window script right before it.

                 Although, since I'm unsure of the new layout height and width (as they could be one of multiple layouts and the layouts could change) I don't really feel the need to use the Move/Resize Window.  It does, however, work since you can select the window by name.

                 I will just leave it how it is, because it seems to work well enough for now.

            • 3. Re: GTRR, New Window, External File

                   But HOW is Adjust Window "the problem"?

              • 4. Re: GTRR, New Window, External File

                          When I do a Select Window and Adjust Window, it still goes back to the parent window

                     It brings the Parent Window to the front, puts it in focus, and puts the New Window behind it.  The Resize to Fit will then work on the Parent Window instead.

                • 5. Re: GTRR, New Window, External File

                       Are you using advanced window options with the GTRR step?

                       I've used adjust window with re-size to fit with no problem and it did not bring the background window to the front. It was a standard method for resizing a new window in some of the Filemaker 11 starter solutions. What you describe sounds like your "focus" is on the wrong window... Perhaps your select window had the "same file" option specified since your GTRR might be opening to a layout in the other file?

                       But I wonder what happens if the new window is specified as "modal"....

                  • 6. Re: GTRR, New Window, External File

                         I didn't use the Advanced Window Options.

                         I change the GTRR to make it modal, the focus was still brought to the Parent Window.  (Since it is modal the New Window was still in front, just did not have the focus.)

                         I had already deselected/unchecked "Use Current File Only" for the Select Window, but it didn't make a difference.

                         I might guess it has to do with my FM12, as it has never really liked me since I installed it, unlike other people I know where things work for them.  Most likely if I ask someone else to do this change for me, then it might work.  Not the first time I had to ask someone to change something because my FM didn't work.

                    • 7. Re: GTRR, New Window, External File

                           The light bulb went on after I posted my last post. (Been up all night in the ER sitting with a sick wife....)

                           The Adjust Window script step needs to be executed from a script performed in the external file. Perform script from the first file can perform a script with the adjust window script step in the second file.

                      • 8. Re: GTRR, New Window, External File

                             Ok, that makes sense.

                             Thanks for your help!

                             Sorry about your wife, hope she feels better.